void OnDetachFromPanel(DetachFromPanelEvent evt)
        {
            UnregisterCallback <DetachFromPanelEvent>(OnDetachFromPanel);
            UnregisterCallback <DragUpdatedEvent>(OnDragUpdate);
            UnregisterCallback <DragPerformEvent>(OnDragPerform);

            AnimationClipPostprocessor.RemoveOnImport(MarkClipListsForUpdate);
            AnimationClipPostprocessor.RemoveOnDelete(MarkClipListsForUpdate);
        }
Example #2
0
        public void Dispose()
        {
            foreach (var marker in markers)
            {
                marker.Dispose();
            }

            markers.Clear();

            foreach (var tag in tags)
            {
                tag.Dispose();
            }

            tags.Clear();

            AnimationClipPostprocessor.RemoveOnImport(m_AnimationClipGuid, ReloadClipAndMarkDirty);
            AnimationClipPostprocessor.RemoveOnDelete(m_AnimationClipGuid, OnDeleteClip);
        }
Example #3
0
        void SetClip(AnimationClip clip)
        {
            if (clip == null)
            {
                m_Clip = null;
                return;
            }

            AnimationClipPostprocessor.RemoveOnImport(m_AnimationClipGuid, ReloadClipAndMarkDirty);
            AnimationClipPostprocessor.RemoveOnDelete(m_AnimationClipGuid, OnDeleteClip);

            m_AnimationClipGuid = SerializableGuidUtility.GetSerializableGuidFromAsset(clip);

            AnimationClipPostprocessor.AddOnImport(m_AnimationClipGuid, ReloadClipAndMarkDirty);
            AnimationClipPostprocessor.AddOnDelete(m_AnimationClipGuid, OnDeleteClip);

            m_Clip = clip;
            m_CachedClipVersion  = AnimationClipPostprocessor.GetClipVersion(clip);
            m_CachedClipName     = clip.name;
            m_CachedClipDuration = Utility.ComputeAccurateClipDuration(clip);
            m_CachedSampleRate   = clip.frameRate;
        }