From 2864e323c308fc66348f890260d654611c64130f Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Fri, 20 Dec 2024 22:28:49 +0100 Subject: [PATCH] [unity] Fixed compile error on Unity 2017.1 introduced in last commit. See #1253. --- .../spine-unity/Editor/Utility/SpineEditorUtilities.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs index 42c0c4cac..4e34e9b20 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs @@ -604,11 +604,11 @@ public static AnimationClip GetAnimationClip (UnityEngine.Object animationWindow PropertyInfo selectionProperty = animEditorField.FieldType.GetProperty("selection", bindingFlagsInstance); object animEditor = animEditorField.GetValue(animationWindow); if (animEditor == null) return null; - object selection = selectionProperty.GetValue(animEditor); + object selection = selectionProperty.GetValue(animEditor, null); if (selection == null) return null; PropertyInfo animationClipProperty = selection.GetType().GetProperty("animationClip"); - return animationClipProperty.GetValue(selection) as AnimationClip; + return animationClipProperty.GetValue(selection, null) as AnimationClip; } public static float GetAnimationTime (UnityEngine.Object animationWindow) { @@ -619,13 +619,13 @@ public static float GetAnimationTime (UnityEngine.Object animationWindow) { FieldInfo animEditorField = AnimationWindowType.GetField("m_AnimEditor", bindingFlagsInstance); object animEditor = animEditorField.GetValue(animationWindow); - System.Type animEditorFieldType = animEditorField.FieldType; + System.Type animEditorFieldType = animEditorField.FieldType; PropertyInfo stateProperty = animEditorFieldType.GetProperty("state", bindingFlagsInstance); System.Type animWindowStateType = stateProperty.PropertyType; PropertyInfo timeProperty = animWindowStateType.GetProperty("currentTime", bindingFlagsInstance); - object state = stateProperty.GetValue(animEditor); - return (float)timeProperty.GetValue(state); + object state = stateProperty.GetValue(animEditor, null); + return (float)timeProperty.GetValue(state, null); } } }