public void OnDestroy() { StateMachineContext componentInParent = GetComponentInParent <StateMachineContext>(); if (componentInParent != null) { for (int i = 0; i < Bindings.Length; i++) { string text = Bindings[i].Name; componentInParent.RemoveStateMachine(text); } } }
public void OnDestroy() { context.RemoveStateMachine(base.name); }