/// <summary> /// Unity callback called when the script is loaded or a value is changed in the inspector (Called in the editor only). /// Validates the start, the AnyState and the enabled states. /// </summary> public override void OnValidate() { base.OnValidate(); // Validate the enabled state. if (m_EnabledState != null && m_EnabledState.parent != this) { m_EnabledState = null; } // Validate the start state and the currently enabled state if (m_StartState != null && m_StartState.parent != this) { m_StartState = null; } // Validate the any state if (m_AnyState != null && m_AnyState.parent != this) { m_AnyState = null; } // Validate the concurrent state if (m_ConcurrentState != null && m_ConcurrentState.parent != this) { m_ConcurrentState = null; } }
/// <summary> /// Unity callback called when the script is loaded or a value is changed in the inspector (Called in the editor only). /// Validates the start, the AnyState and the enabled states. /// </summary> public override void OnValidate () { base.OnValidate(); // Validate the enabled state. if (m_EnabledState != null && m_EnabledState.parent != this) m_EnabledState = null; // Validate the start state and the currently enabled state if (m_StartState != null && m_StartState.parent != this) m_StartState = null; // Validate the any state if (m_AnyState != null && m_AnyState.parent != this) m_AnyState = null; // Validate the concurrent state if (m_ConcurrentState != null && m_ConcurrentState.parent != this) m_ConcurrentState = null; }