Reply To: Using GraphOwner's without MonoBehaviours?

Forums 💬 NodeCanvas ⚙️ Support Using GraphOwner's without MonoBehaviours? Reply To: Using GraphOwner's without MonoBehaviours?

#18084
Gavalakis
Keymaster

    Hello,

    Thanks! I am glad you like NodeCanvas thus far.
    Well, the GraphOwner is a MonoBehaviour that mostly acts as a interface between the object and a graph and manages graph instances, which is actually very convenient 🙂

    You can however if you want and in runtime, instantiate a graph asset and start it without the requirement of a GraphOwner attached, but you’d still need a Blackboard component attached to pass as a reference considering that you want to use variables in that graph (which is most of the times).

    Here is an example code:

    On the other hand, you can also add the GraphOwner component in runtime if you want. If that is something you are interested in, please take a look at this documentation section: [LINK]

    Let me know if the above works for you.
    Thanks again!