Changes made in Subgraphs are not perceived by the Main Graph

Hello dear Unity developers!

I noticed in Behavior Graph that sometimes changes made in Subgraphs are not perceived by the Main Graph. If you have the main behavior graph and if it has subgraphs, and if you are changing the subgraphs, the changes made there are not called.

I cannot provide you a template project because I have no time, but I will provide you repro steps.

How to reproduce:

  1. Create a Behavior Graph with simple repeatable Switch state machine (e.g. Idle, Patrol, Chase). The switch must Restart if the CurrentState has changed (use Restart If modifier).
  2. Create Subgraphs for these states, add OnStart → LogMessage(“Log 1”) in them.
  3. Add these Subgraphs to the appropriate states of the Switch.
  4. Run to ensure that it works (that you see logs)
  5. Add additional OnStart → LogMessage(“Log 2”) to any of the state Subgraphs.
  6. Run the game again
  7. Notice that this new log is not displayed in the console.

So, this is the main problem.
Workaround: Delete the Run Subgraph node and re-create it again if you made changes in this subgraph.

But this recreation may take time depending on the amount of exposed blackboard variables in your Subgraph. So, I would be very happy if you would fix it.

Behavior Version: 1.0.7
Unity Version: 6000.0.25f1

Thank you!

1 Like

I believe @MorganHoarauUnity has a fix for that! I’ll ping him :slight_smile:

1 Like