Skip to content

Commit 5a9c6c9

Browse files
authored
Merge pull request #392 from Unity-Technologies/ut-585_Fixing_2018_2_deprecated_timeline_code_breaks_2018_1
UT-585 Fixing 2018.2 deprecated timeline code, breaks 2018.1
2 parents e2c2989 + 8130635 commit 5a9c6c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Assets/com.unity.formats.fbx/Editor/Scripts/FbxExporter.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3588,7 +3588,13 @@ protected static bool ExportSingleEditorClip(Object editorClipSelected)
35883588
object selClipItem = editorClipSelected.GetType().GetProperty("item").GetValue(editorClipSelected, null);
35893589
object selClipItemParentTrack = selClipItem.GetType().GetProperty("parentTrack").GetValue(selClipItem, null);
35903590
AnimationTrack editorClipAnimationTrack = selClipItemParentTrack as AnimationTrack;
3591-
Object animationTrackObject = UnityEditor.Timeline.TimelineEditor.inspectedDirector.GetGenericBinding (editorClipAnimationTrack);
3591+
3592+
#if UNITY_2018_2_OR_NEWER
3593+
Object animationTrackObject = UnityEditor.Timeline.TimelineEditor.inspectedDirector.GetGenericBinding(editorClipAnimationTrack);
3594+
#else // UNITY_2018_2_OR_NEWER
3595+
Object animationTrackObject = UnityEditor.Timeline.TimelineEditor.playableDirector.GetGenericBinding(editorClipAnimationTrack);
3596+
#endif // UNITY_2018_2_OR_NEWER
3597+
35923598
GameObject animationTrackGO = null;
35933599
if (animationTrackObject is GameObject)
35943600
{

0 commit comments

Comments
 (0)