Skip to content

Commit 8130635

Browse files
author
David Lassonde
committed
* Now using a define to use UnityEditor.Timeline.TimelineEditor.inspectedDirector when the Unity version is >= 2018.2. Fallback to UnityEditor.Timeline.TimelineEditor.playableDirector for earlier versions
1 parent 955d861 commit 8130635

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
@@ -3305,7 +3305,13 @@ protected static bool ExportSingleEditorClip(Object editorClipSelected)
33053305
object selClipItem = editorClipSelected.GetType().GetProperty("item").GetValue(editorClipSelected, null);
33063306
object selClipItemParentTrack = selClipItem.GetType().GetProperty("parentTrack").GetValue(selClipItem, null);
33073307
AnimationTrack editorClipAnimationTrack = selClipItemParentTrack as AnimationTrack;
3308-
Object animationTrackObject = UnityEditor.Timeline.TimelineEditor.inspectedDirector.GetGenericBinding (editorClipAnimationTrack);
3308+
3309+
#if UNITY_2018_2_OR_NEWER
3310+
Object animationTrackObject = UnityEditor.Timeline.TimelineEditor.inspectedDirector.GetGenericBinding(editorClipAnimationTrack);
3311+
#else // UNITY_2018_2_OR_NEWER
3312+
Object animationTrackObject = UnityEditor.Timeline.TimelineEditor.playableDirector.GetGenericBinding(editorClipAnimationTrack);
3313+
#endif // UNITY_2018_2_OR_NEWER
3314+
33093315
GameObject animationTrackGO = null;
33103316
if (animationTrackObject is GameObject)
33113317
{

0 commit comments

Comments
 (0)