Reply To: Graph Nesting Layers

Forums 💬 NodeCanvas ⚙️ Support Graph Nesting Layers Reply To: Graph Nesting Layers

#19231
hcarriker
Participant

    I have upper graphs that are shared amongst all entities of the same type. In these graphs are nested graphs which can keep nesting for however long they need to nest for. The lower level graphs are specific for each type of that entity. For example, monster entity is the type but then there are goblin, orc, etc… The lower levels are different for them. They also all share the same blackboard as to not have to manipulate data in multiple places. What I do is attach a loader script to the goblin/orc that specifies which graph owner to use, which blackboard to use, and also all the subgraphs to assign to the nodes using the tag as a lookup. I have got this working by waiting until the top graph starts its behaviour, and directly after that assigning all the nested graphs and then calling OnBehaviourStart on the node. This creates the instances in the correct order to keep the nested graph references.