예제 #1
0
        protected override void OnCreated()
        {
            ArborFSM stateMachine = NodeGraph.Create <ArborFSM>(gameObject);

            ComponentUtility.RecordObject(stateMachine, "Add ArborFSM");
#if !ARBOR_DEBUG
            stateMachine.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
#endif
            stateMachine.playOnStart         = false;
            stateMachine.updateSettings.type = UpdateType.Manual;
            stateMachine.ownerBehaviour      = this;
            stateMachine.enabled             = false;

            ComponentUtility.RecordObject(this, "Add ArborFSM");
            _StateMachine = stateMachine;
        }
        protected override void OnCreated()
        {
            BehaviourTree behaviourTree = NodeGraph.Create <BehaviourTree>(gameObject);

            ComponentUtility.RecordObject(behaviourTree, "Add BehaviourTree");
#if !ARBOR_DEBUG
            behaviourTree.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
#endif
            behaviourTree.playOnStart         = false;
            behaviourTree.updateSettings.type = UpdateType.Manual;
            behaviourTree.ownerBehaviour      = this;
            behaviourTree.enabled             = false;

            ComponentUtility.RecordObject(this, "Add BehaviourTree");
            _BehaviourTree = behaviourTree;
        }