void OnDestroy() { if (state != null) { state.OnDestroy(); } m_HasBeenInitialized = false; RemoveEditorCallbacks(); TimelineAnimationUtilities.UnlinkAnimationWindow(); }
void OnAfterSequenceChange() { Repaint(); m_SequencePath = state.GetCurrentSequencePath(); m_LastFrameHadSequence = state.editSequence.asset != null; TimelineWindowViewPrefs.SaveAll(); // this prevent clearing the animation window when going in/out of playmode, but // clears it when we switch master timelines if (m_PreviousMasterSequence != null && m_PreviousMasterSequence != state.masterSequence.asset) { TimelineAnimationUtilities.UnlinkAnimationWindow(); } }
void OnAfterSequenceChange() { Repaint(); m_SequencePath = state.GetCurrentSequencePath(); m_LastFrameHadSequence = state.editSequence.asset != null; TimelineWindowViewPrefs.SaveAll(); // this prevent clearing the animation window when going in/out of playmode, but // clears it when we switch master timelines // the cast to a object will handle the case where the sequence has been deleted. object previousMasterSequence = m_PreviousMasterSequence; bool isDeleted = previousMasterSequence != null && m_PreviousMasterSequence == null; bool hasChanged = m_PreviousMasterSequence != null && m_PreviousMasterSequence != state.masterSequence.asset; if (isDeleted || hasChanged) { TimelineAnimationUtilities.UnlinkAnimationWindow(); } }