Graph runtime installation with settings

NodeCanvas Forums General Discussion Graph runtime installation with settings

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #16751

    Hello there!

    I have an issue with runtime installation of the Graphs. I’ve noticed that Initilize() function is called only once in the GraphOwner. So it means that if I set “preinitialize subgraphs” to true and I will have a graph assigned in the editor already or if I have a bound graph, it will preinitialize them. But if I call “StartBehaviour” or “SwitchBehaviour” in runtime, it won’t actually preinitialize subgraphs. I would expect that if I have any settings on the graph owner, any graph that I start should behave the same way. But really, Initialize() is only called for a bound or pre-set graph and those settings work only on those. Is this an expected behaviour or maybe I am missing something?



    This is mostly an omission in regards to use case. Here is a temporary solution for that:

    1) Open up GraphOwner.cs and add Initialize call as shown below in the StartBehaviour method at line #215:

    2) Open up Graph.cs and change line #510, instead of being an assert to be a hasInitialized return check:

    Please note that this is a temporary solution. I will have to handle this better to avoid redundant calls.
    Let me know if this works for you for now.


    Join us on Discord:


    Hi again. Thanks for a quick reply. Yeah, I’ve checked and it does work.

    I did although changed the code to just instantiate and destroy the Owner. It does create additional garbage, but it’s just safer this way for my use case.

    But thanks for help anyways!

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