Пример #1
0
        public static BehaviorTreeEditor ShowWindow()
        {
            BehaviorTreeEditor window = EditorWindow.GetWindow <BehaviorTreeEditor>("行为树调试器");

            List <BehaviorTree> behaviorTrees = BehaviorTreeManager.Instance.Runnings;

            if (behaviorTrees.Count > 0)
            {
                window.SetBehaviorTree(behaviorTrees[0]);
            }

            return(window);
        }
Пример #2
0
        protected override void OnEnable()
        {
            base.OnEnable();
            Instance = this;
            if (mainToolbar == null)
            {
                mainToolbar = new MainToolbar();
            }
            mainToolbar.OnEnable();

            centerView = true;
            EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
        }