Skip to content

Commit b2716ab

Browse files
authored
Merge pull request #477 from Unity-Technologies/UT-2143-fix-export-timeline-clip
UT-2143 fix export timeline clip
2 parents 7bba07c + 50c460f commit b2716ab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

com.unity.formats.fbx/Editor/IExportData.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,11 @@ private static TimelineClip GetTimelineClipFromEditorClip(object editorClip)
152152
/// <returns>The GameObject bound to the editor clip or null if none.</returns>
153153
private static GameObject GetGameObjectBoundToEditorClip(object editorClip)
154154
{
155-
object clipItem = GetPropertyReflection(editorClip, "item");
156-
object parentTrack = GetPropertyReflection(clipItem, "parentTrack");
155+
var timelineClip = GetTimelineClipFromEditorClip(editorClip);
156+
object parentTrack = timelineClip.parentTrack;
157157
AnimationTrack animTrack = parentTrack as AnimationTrack;
158-
159-
#if UNITY_2018_2_OR_NEWER
158+
160159
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
164160

165161
GameObject animationTrackGO = null;
166162
if (animationTrackObject is GameObject)

0 commit comments

Comments
 (0)