Search Issue Tracker

Active

Under Consideration for 1.0.X

Votes

2

Found in [Package]

1.0.6

Issue ID

BEHAVB-146

Regression

No

RunSubgraph Subgraph Variable don't pass assigned BehaviorGraph from the node

Package: Unity Behavior

-

Steps to reproduce:

  1. Install `com.unity.behavior` 1.0.6 or above
  2. Create a three Behavior graphs ({}Nested Subgraph{}, Subgraph and {}Parent Graph{})
  3. Open {}Nested Subgraph{}: Add and Connect a {{Log Message}} node ("Hello World") to the {{On Start}} node.
  4. 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

  1. 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

  1. Add the Parent Graph to a gameObject named "Agent" in the scene
  2. Enter playmode

Expected Result
Console log contains:

  1. `[Agent] Nested Subgraph = "Nested Subgraph"`
  2. `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).
 

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.