void DrawInspector()
        {
            if (serializedObject == null)
            {
                return;
            }

            if (Event.current.type == EventType.Repaint || Event.current.type == EventType.Layout)
            {
                CurvesOwnerInspectorHelper.PreparePlayableAsset(m_TrackCurvesWrapper);
            }

            serializedObject.Update();

            using (var changeScope = new EditorGUI.ChangeCheckScope())
            {
                DrawTrackProperties();

                if (changeScope.changed)
                {
                    serializedObject.ApplyModifiedProperties();
                    ApplyChanges();
                }
            }
        }
        void ShowPlayableAssetInspector()
        {
            if (!m_SelectionInfo.selectedAssetTypesAreHomogeneous)
            {
                return;
            }

            if (m_SelectedPlayableAssetsInspector != null)
            {
                if (Event.current.type == EventType.Repaint || Event.current.type == EventType.Layout)
                {
                    foreach (var selectedItem in m_SelectionCache)
                    {
                        CurvesOwnerInspectorHelper.PreparePlayableAsset(selectedItem);
                    }
                }

                EditorGUI.BeginChangeCheck();
                using (new EditorGUI.DisabledScope(IsLocked()))
                {
                    m_SelectedPlayableAssetsInspector.OnInspectorGUI();
                }

                if (EditorGUI.EndChangeCheck())
                {
                    MarkClipsDirty();
                    if (TimelineWindow.IsEditingTimelineAsset(m_TimelineAsset) && TimelineWindow.instance.state != null)
                    {
                        var inspectorChangeHandler = m_SelectedPlayableAssetsInspector as IInspectorChangeHandler;
                        if (inspectorChangeHandler != null)
                        {
                            inspectorChangeHandler.OnPlayableAssetChangedInInspector();
                        }
                        else
                        {
                            TimelineEditor.Refresh(RefreshReason.ContentsModified);
                        }
                    }
                }
            }
        }
        void ShowPlayableAssetInspector()
        {
            if (!m_SelectionInfo.selectedAssetTypesAreHomogeneous)
            {
                return;
            }

            if (m_SelectedPlayableAssetsInspector != null)
            {
                foreach (var selectedItem in m_SelectionCache)
                {
                    CurvesOwnerInspectorHelper.PreparePlayableAsset(selectedItem);
                }

                EditorGUI.BeginChangeCheck();
                using (new EditorGUI.DisabledScope(IsLocked()))
                {
                    m_SelectedPlayableAssetsInspector.OnInspectorGUI();
                }
                if (EditorGUI.EndChangeCheck())
                {
                    MarkClipsDirty();
                    if (TimelineWindow.IsEditingTimelineAsset(m_TimelineAsset) && TimelineWindow.instance.state != null)
                    {
                        var basicInspector = m_SelectedPlayableAssetsInspector as BasicAssetInspector;
                        if (basicInspector != null)
                        {
                            basicInspector.ApplyChanges();
                        }
                        else
                        {
                            TimelineEditor.Refresh(RefreshReason.ContentsModified);
                        }
                    }
                }
            }
        }