To start off, please download the extension “bridge” packages from the Downloads section of this website and install them in your Unity project. These packages respectively will then allow your to add a nested flowscript node within NodeCanvas BehaviourTrees and FSMs. These new nodes also offer some help in their description shown in their inspector, although the usage is pretty straightforward.
For example in the case of an FSM, (and once the extensions are installed) you simply need to add the “Nested/FlowScript State” node and hit “Create New” to create a new flowscript for the node.
As soon as the FlowScript State is Entered, so will the flowscript become active and until the state Exits. More specifically:
– When the flowscript becomes active (state Enter), the OnEnable event is called.
– As long as the flowscript is active (state Update), the Update event is called, and all other events (like input) are evaluated.
– When the flowscript becomes deactivated (state Exit), the OnDisable event is called.
– To force the FlowScript State in the FSM to finish (and as such proceed to the next state if there is an OnFinish transition), you simply need to use and execute the “Flow Controllers/Finish” node in the flowscript.
I will write a detailed documentation section about the integration as soon as I get back from holidays, but please let me know with which parts of the integration you need further help if any, and I would be glad to help you! 🙂