mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 17:18:44 +08:00
[unity] Fixed compile error on Unity 2017.1 of last commit. See #1640.
This commit is contained in:
parent
78302ac1d8
commit
80b2246d62
@ -35,6 +35,10 @@
|
||||
#define HAS_CULL_TRANSPARENT_MESH
|
||||
#endif
|
||||
|
||||
#if UNITY_2017_2_OR_NEWER
|
||||
#define NEWPLAYMODECALLBACKS
|
||||
#endif
|
||||
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@ -142,15 +146,27 @@ namespace Spine.Unity.Editor {
|
||||
separatorSlotNames = so.FindProperty("separatorSlotNames");
|
||||
separatorSlotNames.isExpanded = true;
|
||||
|
||||
#if NEWPLAYMODECALLBACKS
|
||||
EditorApplication.playModeStateChanged += OnPlaymodeChanged;
|
||||
#else
|
||||
EditorApplication.playmodeStateChanged += OnPlaymodeChanged;
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnDisable () {
|
||||
#if NEWPLAYMODECALLBACKS
|
||||
EditorApplication.playModeStateChanged -= OnPlaymodeChanged;
|
||||
#else
|
||||
EditorApplication.playmodeStateChanged -= OnPlaymodeChanged;
|
||||
#endif
|
||||
DisableEditReferenceRectMode();
|
||||
}
|
||||
|
||||
#if NEWPLAYMODECALLBACKS
|
||||
void OnPlaymodeChanged (PlayModeStateChange mode) {
|
||||
#else
|
||||
void OnPlaymodeChanged () {
|
||||
#endif
|
||||
DisableEditReferenceRectMode();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user