[unity] SpineEditorUtilities better defines.

This commit is contained in:
pharan 2018-12-05 20:12:10 +08:00
parent ce9492a74c
commit 02cbf807eb

View File

@ -1482,28 +1482,28 @@ namespace Spine.Unity.Editor {
static Dictionary<int, SkeletonUtilityBone> skeletonUtilityBoneTable = new Dictionary<int, SkeletonUtilityBone>(); static Dictionary<int, SkeletonUtilityBone> skeletonUtilityBoneTable = new Dictionary<int, SkeletonUtilityBone>();
static Dictionary<int, BoundingBoxFollower> boundingBoxFollowerTable = new Dictionary<int, BoundingBoxFollower>(); static Dictionary<int, BoundingBoxFollower> boundingBoxFollowerTable = new Dictionary<int, BoundingBoxFollower>();
#if UNITY_2017_2_OR_NEWER #if NEWPLAYMODECALLBACKS
internal static void IconsOnPlaymodeStateChanged (PlayModeStateChange stateChange) { internal static void IconsOnPlaymodeStateChanged (PlayModeStateChange stateChange) {
#else #else
internal static void IconsOnPlaymodeStateChanged () { internal static void IconsOnPlaymodeStateChanged () {
#endif #endif
skeletonRendererTable.Clear(); skeletonRendererTable.Clear();
skeletonUtilityBoneTable.Clear(); skeletonUtilityBoneTable.Clear();
boundingBoxFollowerTable.Clear(); boundingBoxFollowerTable.Clear();
#if UNITY_2018 #if NEWHIERARCHYWINDOWCALLBACKS
EditorApplication.hierarchyChanged -= IconsOnChanged; EditorApplication.hierarchyChanged -= IconsOnChanged;
#else #else
EditorApplication.hierarchyWindowChanged -= IconsOnChanged; EditorApplication.hierarchyWindowChanged -= IconsOnChanged;
#endif #endif
EditorApplication.hierarchyWindowItemOnGUI -= IconsOnGUI; EditorApplication.hierarchyWindowItemOnGUI -= IconsOnGUI;
if (!Application.isPlaying && Preferences.showHierarchyIcons) { if (!Application.isPlaying && Preferences.showHierarchyIcons) {
#if UNITY_2018 #if NEWHIERARCHYWINDOWCALLBACKS
EditorApplication.hierarchyChanged += IconsOnChanged; EditorApplication.hierarchyChanged += IconsOnChanged;
#else #else
EditorApplication.hierarchyWindowChanged += IconsOnChanged; EditorApplication.hierarchyWindowChanged += IconsOnChanged;
#endif #endif
EditorApplication.hierarchyWindowItemOnGUI += IconsOnGUI; EditorApplication.hierarchyWindowItemOnGUI += IconsOnGUI;
IconsOnChanged(); IconsOnChanged();
} }