mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Mark and make hierarchy icons easy to opt-out for users with complex scenes.
This commit is contained in:
parent
35a7a7be76
commit
a2abf956be
@ -35,6 +35,7 @@
|
|||||||
* Full irrevocable rights and permissions granted to Esoteric Software
|
* Full irrevocable rights and permissions granted to Esoteric Software
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define SPINE_SKELETONANIMATOR
|
#define SPINE_SKELETONANIMATOR
|
||||||
|
#define SPINE_HIERARCHY_ICONS
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -203,8 +204,12 @@ namespace Spine.Unity.Editor {
|
|||||||
skeletonUtilityBoneTable = new Dictionary<int, SkeletonUtilityBone>();
|
skeletonUtilityBoneTable = new Dictionary<int, SkeletonUtilityBone>();
|
||||||
boundingBoxFollowerTable = new Dictionary<int, BoundingBoxFollower>();
|
boundingBoxFollowerTable = new Dictionary<int, BoundingBoxFollower>();
|
||||||
|
|
||||||
|
#if SPINE_HIERARCHY_ICONS
|
||||||
|
EditorApplication.hierarchyWindowChanged -= HierarchyWindowChanged;
|
||||||
EditorApplication.hierarchyWindowChanged += HierarchyWindowChanged;
|
EditorApplication.hierarchyWindowChanged += HierarchyWindowChanged;
|
||||||
|
EditorApplication.hierarchyWindowItemOnGUI -= HierarchyWindowItemOnGUI;
|
||||||
EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI;
|
EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI;
|
||||||
|
#endif
|
||||||
|
|
||||||
HierarchyWindowChanged();
|
HierarchyWindowChanged();
|
||||||
initialized = true;
|
initialized = true;
|
||||||
@ -394,6 +399,7 @@ namespace Spine.Unity.Editor {
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Hierarchy Icons
|
#region Hierarchy Icons
|
||||||
|
#if SPINE_HIERARCHY_ICONS
|
||||||
static void HierarchyWindowChanged () {
|
static void HierarchyWindowChanged () {
|
||||||
skeletonRendererTable.Clear();
|
skeletonRendererTable.Clear();
|
||||||
skeletonUtilityBoneTable.Clear();
|
skeletonUtilityBoneTable.Clear();
|
||||||
@ -445,6 +451,7 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Auto-Import Entry Point
|
#region Auto-Import Entry Point
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user