public void OnEnable()
        {
            m_ClipCurveEditor = new ClipInspectorCurveEditor();

            m_SelectionCache = new List <EditorClipSelection>();
            var selectedClips = new List <TimelineClip>();

            foreach (var editorClipObject in targets)
            {
                var editorClip = editorClipObject as EditorClip;
                if (editorClip != null)
                {
                    //all selected clips should have the same TimelineAsset
                    if (!IsTimelineAssetValidForEditorClip(editorClip))
                    {
                        m_SelectionCache.Clear();
                        return;
                    }
                    m_SelectionCache.Add(new EditorClipSelection(editorClip));
                    selectedClips.Add(editorClip.clip);
                }
            }

            InitializeProperties();
            m_SelectionInfo = new ClipInspectorSelectionInfo(selectedClips);

            if (m_SelectionInfo.selectedAssetTypesAreHomogeneous)
            {
                var selectedAssets = m_SelectionCache.Select(e => e.clip.asset).ToArray();
                m_SelectedPlayableAssetsInspector = TimelineInspectorUtility.GetInspectorForObjects(selectedAssets);
            }

            m_MultiselectionHeaderTitle = m_SelectionCache.Count + " " + Styles.MultipleSelectionTitle.text;
            m_ClipAssetTitle.text       = PlayableAssetSectionTitle();
        }
 public void OnEnable()
 {
     this.m_ClipCurveEditor = new ClipInspectorCurveEditor();
     this.m_DefaultIcon     = EditorGUIUtility.FindTexture("DefaultAsset Icon");
     this.m_SelectionCache  = new List <ClipInspector.EditorClipSelection>();
     Object[] targets = base.get_targets();
     for (int i = 0; i < targets.Length; i++)
     {
         Object     @object    = targets[i];
         EditorClip editorClip = @object as EditorClip;
         if (editorClip != null)
         {
             if (!this.IsTimelineAssetValidForEditorClip(editorClip))
             {
                 this.m_SelectionCache.Clear();
                 return;
             }
             this.m_SelectionCache.Add(new ClipInspector.EditorClipSelection(editorClip));
         }
     }
     this.m_SelectionInfo = this.BuildSelectionInfo();
     if (this.m_SelectionInfo.selectedAssetTypesAreHomogeneous)
     {
         Object[] objects = (from e in this.m_SelectionCache
                             select e.clip.asset).ToArray <Object>();
         this.m_SelectedPlayableAssetsInspector = TimelineInspectorUtility.GetInspectorForObjects(objects);
     }
     this.m_MultiselectionHeaderTitle = this.m_SelectionCache.Count + " " + ClipInspector.Styles.MultipleSelectionTitle.get_text();
     this.m_ClipAssetTitle.set_text(this.PlayableAssetSectionTitle());
     this.InitializeProperties();
 }