Example #1
0
        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);
                }
            }
        }
Example #2
0
 public void OnDestroy()
 {
     context.RemoveStateMachine(base.name);
 }