public static void Init(IEnumerable <UnityEngine.Object> toExport, string filename = "", bool isTimelineAnim = false)
        {
            ExportModelEditorWindow window = CreateWindow <ExportModelEditorWindow> ();

            window.IsTimelineAnim = isTimelineAnim;

            int numObjects = window.SetGameObjectsToExport(toExport);

            if (string.IsNullOrEmpty(filename))
            {
                filename = window.DefaultFilename;
            }
            window.InitializeWindow(filename);
            window.SingleHierarchyExport = (numObjects == 1);
            window.Show();
        }
        public static ExportModelEditorWindow Init(IEnumerable <UnityEngine.Object> toExport, string filename = "", TimelineClip timelineClip = null, PlayableDirector director = null)
        {
            ExportModelEditorWindow window = CreateWindow <ExportModelEditorWindow>();

            window.IsTimelineAnim       = (timelineClip != null);
            window.TimelineClipToExport = timelineClip;
            window.PlayableDirector     = director ? director : TimelineEditor.inspectedDirector;


            int numObjects = window.SetGameObjectsToExport(toExport);

            if (string.IsNullOrEmpty(filename))
            {
                filename = window.DefaultFilename;
            }
            window.InitializeWindow(filename);
            window.SingleHierarchyExport = (numObjects == 1);
            window.Show();
            return(window);
        }