Focusing a variable from Inspector

Just like clicking on a specific reference in the Unity Inspector moves focus to that object in the Hierarchy or Project window, it would be very useful clicking on any Variable in the Behavior Graph Inspector moves focus to that Variable registered in Blackboard.

It’s also hard to check which Sub Graph is called Attack Behaviour, as it doesn’t even match the asset name.

Hi @MOBLIN,

Thank you for the suggestion. We do want to add various finds and focus quality of life features like this!

Could you open a bug/feature request for us so you can track externally?

I’m not sure what you are suggesting… Does it mean to delete the current post and make a new post with the Topic Type to Bug?

Not at all! The post is fine, but if you want to have an issue you can track to see when we progress on it you can follow these steps to open a bug / feature request: https://support.unity.com/hc/en-us/articles/206336985-How-do-I-submit-a-bug-report

Please let me know how to check what this node refers to. Witch graph is it in the image?

Hi @MOBILIN,

There is some confusion here, let me try to explain.
Note: I’ll refer “BlackboardVariable” as “BBV”

The RunSubgraph node have 2 variants:

  • Run Subgraph”: Allows to run a subgraph statically in the current graph. This means the subgraph’s graph is going to be embedded inside of the current graph and it is possible to override the BBVs of the linked subgraph. Usually, you want to use this variant when you want to modularize a functionality that will always use the same data.
  • Run Subgraph Dynamically”: Instead of assigning a graph asset directly to the RunSubgraph node, it is possible to assign a BBV<Subgraph>. This means that the RunSubgraph node won’t be able to embed the subgraph’s graph in the current graph as the BBV<Subgraph> is potentially going to change (it is considered dynamic). This also means you won’t be able to access it’s Blackboard. To alleviate this limitation, it is however possible to assign a Blackboard Asset that is going to be used as an interface that the node will try to feed to the subgraph at runtime.

In your screenshot, the RunSubgraph is dynamic:

  • The Subgraph variable is assigned to a BBV named Attack Behavior
  • The Blackboard variable is assigned to BB_Attack that is used as a variables interface (wrongly named but please ignore for the time being, it’s a bug and is actually referring to BB_Character_Attack).
    • If you open BB_Character_Attack you will see the same BBV that are displayed on the RunSubgraph node.

In the demo context, this graph showcase how you can inject a behavior inside of a graph. If you have a look at the Player prefab, you will be able to see what graph is injected into the graph at runtime:

You can change this graph to another that “implementsBB_Character_Attack (aka. references it in their blackboard). In the demo, there are 3 of such graphs: B_Character_Attack_Chain, B_Character_Attack_Combo and B_Character_Attack_Simple.

B_StateMachine_Character is also used on the AgentPatrol prefab (on Character again), this time injecting B_Character_Attack_Simple.

Hope this help, don’t hesitate if you have more question :slightly_smiling_face:

1 Like