Example #1
0
        public void OnEnable()
        {
            xmlAI         = serializedObject.FindProperty("xmlAI");
            updateAllTree = serializedObject.FindProperty("updateAllTree");
            waitTime      = serializedObject.FindProperty("waitTime");

            imgLogo   = (Texture2D)Resources.Load("logo");
            behTarget = target as BehaviorAI;
        }
        private void SetGraph()
        {
            BehaviorAI selected = selectedBehaviour;

            if (selected != null)
            {
                if (currentBehaviour == null || selected != currentBehaviour || selected.behaviour == null)
                {
                    selected.MakeBehaviour();
                    components = new ComponentsManager(selected.gameObject);
                }

                currentBehaviour = selected;
                MakeArrangGraph();
            }
        }
 public void OnLostFocus()
 {
     currentBehaviour = null;
     SetGraph();
 }
 public void OnDestroy()
 {
     currentBehaviour = null;
 }