File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
com.unity.formats.fbx/Editor Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -152,15 +152,11 @@ private static TimelineClip GetTimelineClipFromEditorClip(object editorClip)
152
152
/// <returns>The GameObject bound to the editor clip or null if none.</returns>
153
153
private static GameObject GetGameObjectBoundToEditorClip ( object editorClip )
154
154
{
155
- object clipItem = GetPropertyReflection ( editorClip , "item" ) ;
156
- object parentTrack = GetPropertyReflection ( clipItem , " parentTrack" ) ;
155
+ var timelineClip = GetTimelineClipFromEditorClip ( editorClip ) ;
156
+ object parentTrack = timelineClip . parentTrack ;
157
157
AnimationTrack animTrack = parentTrack as AnimationTrack ;
158
-
159
- #if UNITY_2018_2_OR_NEWER
158
+
160
159
Object animationTrackObject = UnityEditor . Timeline . TimelineEditor . inspectedDirector . GetGenericBinding ( animTrack ) ;
161
- #else // UNITY_2018_2_OR_NEWER
162
- Object animationTrackObject = UnityEditor . Timeline . TimelineEditor . playableDirector . GetGenericBinding ( animTrack ) ;
163
- #endif // UNITY_2018_2_OR_NEWER
164
160
165
161
GameObject animationTrackGO = null ;
166
162
if ( animationTrackObject is GameObject )
You can’t perform that action at this time.
0 commit comments