Reply To: Runtime instantiation Tips

NodeCanvas Forums General Discussion Runtime instantiation Tips Reply To: Runtime instantiation Tips

#11469
chocolacode
Participant

Hey,

I am referring to part of the Nodecanvas documentation called “Runtime Instantiation Tips”

I found that segment when I was trying to start a behavior tree at runtime and switching FSM at runtime, however everything explained in there is if you do it by coding

I would like to suggest to add the same documentation but using Action tasks

here are the marked segments marked(*)that would be helpful to have explained in Graphical way by Action Tasks in FSM or BT

“…
(*)Option 1
You have a game object prefab with a BehaviourTreeOwner. You also have a created BehaviourTree.
At runtime you can instantiate the BehaviourTreeOwner game object prefab …

(*)Option 2
You only have a BehaviourTree created and no BehaviourTreeOwner at all. You can add the BehaviourTreeOwner component at runtime and similarily to above, Start a new graph for them…

(*)Of course in most cases you will also want to assign a blackboard for the BehaviourTreeOwner to use.

Going Further
(*)Using the StartBehaviour(Graph) or SwitchBehaviour(Graph) you can go further and even switch BehaviourTrees at runtime.

(*)While this is quite possible, it is best design wise, to have only ony BehaviourTree and switch behaviours within using Nested Behaviour Trees.
All the above examples are also true for State Machines as well….”

please let me know if this is possible

Thanks in advance,