[Request] Graph Editor persistence

NodeCanvas Forums General Discussion [Request] Graph Editor persistence

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #15656
    patrickl
    Participant

    Hi,

    Is there any way to have the graph remember the last graph/nested graph that was being edited and stay selected when entering runtime or vice versa when exiting runtime? The same goes when selecting a different graph owners or coming back to the previous selected. It always resets to the top level graph and can get very annoying when working with several layers of nested FSM/BT’s. Ideally it would also use the same context for all agents that share the same graph asset.

    If this is not possible now is it something you would consider for future releases? Nested graphs are so amazing but can be tedious to work with when iterating/testing specific deeply nestedย  graphs.

     

    Thanks

    #15663
    Gavalakis
    Keymaster

    Hello there,

    Unfortunately this is not possible, but there is also a good technical reason why it isn’t ๐Ÿ™‚
    In runtime, SubGraphs do not initialize until they are first used (unless Pre-Initialize Subgraphs is checked in GraphOwner insepctor). As a result, when entering playmode, if the subgraph in graph editor was to be remain visible, then it would mean that we will no longer be viewing the initialized instance subgraph that is used in runtime, but rather still viewing the original asset subgraph. This can be totally confusing since we will be viewing the wrong graph (not to mentioned that accidentally also modify it).

    I hope this clarifies the technical reason behind this ๐Ÿ™‚

    Let me know what you think. Thanks!

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

    #15671
    patrickl
    Participant

    That makes sense, thanks for the explanation.

    What about remembering the last context for a graph when deselecting and re-selecting the same agent at editor time only? For example if I select GameObject “A” and edit a sub graph and then select another GameObject “B” then re-select “A” it would remember the last sub graph I was editing? It seems to do this when exiting runtime so maybe it is possible.

    Maybe there could be a “context” history for each unique graph asset so if Iย  select another FSM owner with the same asset it would use the same context.

    One other suggestion/question – could something similar to the Animator “Auto Live Link” be possible? So once the editor is running it automatically opens the lowest level active graph if enabled?

    #15682
    Gavalakis
    Keymaster

    Hello again,

    Making this happen for editor (only; not play mode) would be possible, yes. I will take a look at that ๐Ÿ™‚
    Regarding “Auto Live Link”, I am not sure I understand what you mean by saying “so once the editor is running it automatically opens the lowest level active graph if enabled”. Can you please rephrase that? ๐Ÿ™‚

    Thanks!

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

    #15688
    patrickl
    Participant

    During runtime the graph will automatically open the sub graph of the currently active task. So for example, if I have a top level FSM graph and a nested FSM graph, once a task in the nested graph is active the graph will open the nested FSM graph (if the option is enabled). Similar to how the Unity Animator works.

    #15703
    Gavalakis
    Keymaster

    Hello again,

    I see what you mean now. Unfortunately this cant really make it, because there might be more than one tasks or nodes active at the same time. In FSM when the Concurrent node is used, or in Behaviour Trees when the Parallel composite node is used.

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

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