Reply To: Duplicating subtrees

Forums 💬 NodeCanvas ⚙️ Support Duplicating subtrees Reply To: Duplicating subtrees

#19579
Gavalakis
Keymaster

    Hey,

    The way that SubTree nodes are duplicated is totaly by design to not duplicate the actual BehaviourTree but rather to reference it.
    The way that usually SubTrees are used are for example to use a ‘Patrol’ subtree more than once within the master Behaviour Tree. You would want the ‘Patrol’ Subtree to be the same in all cases.

    The only reason I can think for duplicating the actual BehaviourTree would be to use it as a starting point for building a completely new one (meaning with new purpose).
    If that’s the case, right now, you can duplicate the actual GameObject that the BehaviourTree lies on (found in the hierachy), create a new SubTree Node and assign that duplicated BehaviourTree to the target behaviour of the node. The fact that Graphs live on normal GameObjects gives that nice flexibility 🙂

    With that said, I will see to adding your suggested option for duplicating SubTree nodes if it doesn’t complicate the workflow.
    Multiple Node duplication sounds more valid in my opionion. I’ve written it down 😉

    Thanks. Im glad you like NC 🙂