Steps to reproduce:
- Install `com.unity.behavior` 1.0.6 or above
- Create a three Behavior graphs (Nested Subgraph, Subgraph and Parent Graph)
- Open Nested Subgraph: Add and Connect a Log Message node ("Hello World") to the On Start node.
- Open Subgraph:
- Add and connect a sequence of Log Variable and Run Subgraph node to On Start.
- Add a blackboard variable of type `Subgraph` named "Nested Subgraph"
- Assign the subgraph variable to both the Log Variable} and {{Run Subgraph nodes
- Open Graph:
- Add and connect Run Subgraph to On Start
- Assign the Subgraph graph asset to the Run Subgraph Node
- Inspect the Run Subgraph node and set the "Nested Subgraph" field with Nested Subgraph graph asset
- Add the Parent Graph to a gameObject named "Agent" in the scene
- Enter playmode
Expected Result
Console log contains:
- `[Agent] Nested Subgraph = "Nested Subgraph"`
- `Hello World`
Actual Result
Console log contains: `[Agent] Nested Subgraph = null`
Workaround
Always linked a blackboard variable instead of assigning subgraph directly on the Run Subgraph node inspector. (See https://discussions.unity.com/t/nested-dynamic-behavior-subgraphs/1699129/5).