1313
1414namespace UnityEditor
1515{
16- internal class AnimationModeDriver : ScriptableObject
16+ public class AnimationModeDriver : ScriptableObject
1717 {
1818 internal delegate bool IsKeyCallback ( Object target , string propertyPath ) ;
1919
@@ -65,11 +65,14 @@ static private AnimationModeDriver DummyDriver()
6565 // Stops animation mode, as used by the animation editor.
6666 public static void StopAnimationMode ( )
6767 {
68- StopAnimationMode ( DummyDriver ( ) ) ;
68+ Internal_StopAnimationMode ( DummyDriver ( ) ) ;
6969 }
7070
7171 // Stops animation mode, as used by the animation editor.
72- extern internal static void StopAnimationMode ( Object driver ) ;
72+ public static void StopAnimationMode ( AnimationModeDriver driver )
73+ {
74+ Internal_StopAnimationMode ( driver ) ;
75+ }
7376
7477 // Returns true if the editor is currently in animation mode.
7578 public static bool InAnimationMode ( )
@@ -78,19 +81,22 @@ public static bool InAnimationMode()
7881 }
7982
8083 // Returns true if the editor is currently in animation mode.
81- internal static bool InAnimationMode ( Object driver )
84+ public static bool InAnimationMode ( AnimationModeDriver driver )
8285 {
8386 return Internal_InAnimationMode ( driver ) ;
8487 }
8588
8689 // Starts animation mode, as used by the animation editor.
8790 public static void StartAnimationMode ( )
8891 {
89- StartAnimationMode ( DummyDriver ( ) ) ;
92+ Internal_StartAnimationMode ( DummyDriver ( ) ) ;
9093 }
9194
9295 // Starts animation mode, as used by the animation editor.
93- extern internal static void StartAnimationMode ( Object driver ) ;
96+ public static void StartAnimationMode ( AnimationModeDriver driver )
97+ {
98+ Internal_StartAnimationMode ( driver ) ;
99+ }
94100
95101 // Stops animation playback mode, as used by the animation editor.
96102 internal static void StopAnimationPlaybackMode ( )
@@ -129,8 +135,10 @@ internal static void StartAnimationRecording()
129135 onAnimationRecordingStart ? . Invoke ( ) ;
130136 }
131137
132- [ NativeThrows ]
133- extern internal static void StartCandidateRecording ( Object driver ) ;
138+ internal static void StartCandidateRecording ( AnimationModeDriver driver )
139+ {
140+ Internal_StartCandidateRecording ( driver ) ;
141+ }
134142
135143 [ NativeThrows ]
136144 extern internal static void AddCandidate ( EditorCurveBinding binding , PropertyModification modification , bool keepPrefabOverride ) ;
@@ -155,7 +163,7 @@ internal static void StartAnimationRecording()
155163 extern internal static void SampleCandidateClip ( [ NotNull ] GameObject gameObject , [ NotNull ] AnimationClip clip , float time ) ;
156164
157165 [ NativeThrows ]
158- extern internal static void SamplePlayableGraph ( [ NotNull ] GameObject gameObject , PlayableGraph graph , int index , float time ) ;
166+ extern public static void SamplePlayableGraph ( PlayableGraph graph , int index , float time ) ;
159167
160168 [ NativeThrows ]
161169 extern public static void AddPropertyModification ( EditorCurveBinding binding , PropertyModification modification , bool keepPrefabOverride ) ;
@@ -190,8 +198,15 @@ internal static void StartAnimationRecording()
190198 // Return editor curve bindings for animator hierarhcy that need to be snapshot for animation mode.
191199 extern internal static EditorCurveBinding [ ] GetAnimatorBindings ( [ NotNull ] GameObject root ) ;
192200
201+ extern private static void Internal_StartAnimationMode ( Object driver ) ;
202+
203+ extern private static void Internal_StopAnimationMode ( Object driver ) ;
204+
193205 extern private static bool Internal_InAnimationMode ( Object driver ) ;
194206
195207 extern private static bool Internal_InAnimationModeNoDriver ( ) ;
208+
209+ [ NativeThrows ]
210+ extern private static void Internal_StartCandidateRecording ( Object driver ) ;
196211 }
197212}
0 commit comments