Using GraphOwner's without MonoBehaviours?

NodeCanvas Forums Support Using GraphOwner's without MonoBehaviours?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11901
    strich
    Participant

    Hi,

    Loving nodeCanvas so far! We’re building an architecture that tries to avoid using Unity gameobjects for much of its dataflow and logic. Is it at all possible to separate the GraphOwner from MonoBehaviour? I understand that when playing in-editor and debugging it is worth having a GO with the GraphOwner, but when playing the game in stand-alone it’d be nice to not require MonoBehaviour.

    This will also help us setup multi-threading in the future.

    Cheers.

    #11907
    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!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.