Inspect subgraphs in Canvas

Forums 💬 NodeCanvas ⚙️ Support Inspect subgraphs in Canvas

  • This topic has 0 replies, 2 voices, and was last updated 6 years ago by Gavalakis.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16492
    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

      #16495
      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 🙂

        #16494
        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

          #16493
          Gavalakis
          Keymaster

            Hey,

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

            Thanks

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