mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Using InteractionMode.AutomatedAction at prefab Revert() call in newer Unity versions. See #1273.
This commit is contained in:
parent
16a1cc9395
commit
d9935741c2
@ -43,6 +43,10 @@
|
||||
#define CONFIGURABLE_ENTER_PLAY_MODE
|
||||
#endif
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
#define REVERT_HAS_OVERLOADS
|
||||
#endif
|
||||
|
||||
#define SPINE_OPTIONAL_RENDEROVERRIDE
|
||||
#define SPINE_OPTIONAL_MATERIALOVERRIDE
|
||||
|
||||
@ -100,7 +104,11 @@ namespace Spine.Unity {
|
||||
var objectOverrides = UnityEditor.PrefabUtility.GetObjectOverrides(instanceRoot);
|
||||
foreach (UnityEditor.SceneManagement.ObjectOverride objectOverride in objectOverrides) {
|
||||
if (objectOverride.instanceObject == meshFilter) {
|
||||
#if REVERT_HAS_OVERLOADS
|
||||
objectOverride.Revert(UnityEditor.InteractionMode.AutomatedAction);
|
||||
#else
|
||||
objectOverride.Revert();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user