Inspect subgraphs in Canvas

NodeCanvas Forums Support Inspect subgraphs in Canvas

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14727
    w
    Participant

    Hello,

    In previous versions we were able to inspect any subgraphs in the Canvas via code:

    This allows us to extend our own tools to navigate through complex graph hierarchy.

    In 3.0, currentGraph/currentChildGraph setters become private, I tried the following code but it doesn’t seem to work.
    GraphEditor.SetReferences(someNode.subGraph, someOwner, someOwner.blackboard);

    Is it still possible to set subgraphs in the editor through code?

    Thanks

    #14735
    Gavalakis
    Keymaster

    Hello again,

    The ‘currentChildGraph’ property has been basically replaced with two new methods those being ‘GetCurrentChildGraph()’ and ‘SetCurrentChildGraphAssignable(IGraphAssignable assignable)’.

    The ‘IGraphAssignable’ parameter of the ‘SetCurrentChildGraphAssignable’ method, is basically the node which contains the SubGraph (all nodes containing a subgraph are IGraphAssignables).

    Having said that, both of those methods are ‘internal’. If you want to use them please change their access modifier to ‘public’. I can also make them public for the next version if this is something you will be using.

    Let me know if that works for you.

    Thanks 🙂

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

    #14750
    w
    Participant

    Thanks Gavalakis, it works great. I will change the methods to public myself for now but if you could make them public in the next version that would be great!

    Thanks
    Wei

    #14752
    Gavalakis
    Keymaster

    Hey,

    You are welcome. I am glad it works for you. Sure thing. I will make them public, that’s OK 🙂

    Thanks

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

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