Behavior Package 1.0.16 Released!

We’re excited to announce that Behavior 1.0.16 is now available!

This release brings support for Unity 6.5, a revamped prefab workflow for BehaviorGraphAgent, new node lifecycle APIs, automatic enum dependency tracking, significant subgraph reliability improvements, and many bug fixes across the board.

Support for Unity 6.5+

Behavior 1.0.16 now supports Unity 6000.5 and 6000.6 thanks to the migration from InstanceID to EntityId, aligning with recent engine API changes. If you’re already on Unity 6.5 or newer, upgrading to 1.0.16 is recommended.

BehaviorGraphAgent Prefab Workflow

The prefab experience for BehaviorGraphAgent has been significantly improved. Blackboard variable overrides now show standard Unity prefab styling (bold text for modified values), and per-variable Apply to Prefab / Revert from Prefab context menu options are available.

Please note: In Unity version below 6000.5, ‘Right-click on the BehaviorGraphAgent component header > Modified Component > Apply to Prefab’ may not work due to a Unity limitation with [SerializeReference]. You can use the per-variable context menu or the top-level ‘Overrides > Apply All’ as workarounds.

Runtime Graph Lifecycle Improvements

This release introduces two new node lifecycle APIs: Node.OnSetup() and Node.OnTeardown(). These provide explicit hooks for node initialization and cleanup, giving you more control over the runtime graph lifecycle.

Edit: Please note that Node.OnSetup is currently called before BlackboardVariable overrides are applied to the graph modules. This means that any value set to the BehaviorGraphAgent are not available in OnSetup. This is going to be fixed in the next patch.

This is mostly a backend change that should not affect existing user code, but it allowed us to fix many issues and prepare the backend for future improvements.

Learn more about the runtime graph lifecycle in the updated documentation:

Enum Dependency Tracking

Behavior graphs now automatically track enum dependency signatures. When an enum used by your graph changes, the graph is automatically reimported and rebuilt, even when the graph editor is not open. A new Tools/Behavior menu action lets you select graphs affected by the last enum-change reimport pass.

This also fixes a regression from 1.0.14 where editing an enum used by a SwitchComposite would trigger a null-reference exception while the graph editor was open (UUM-135864).

Notable Fixes

  • Subgraph improvement: reliability has been greatly improved in this release with many bug fixes.
  • Editor stutter: Fixed editor stuttering when panning and dragging connections in large Behavior Graphs (UUM-139944).
  • Stale blackboard references: Fixed node fields retaining stale references to deleted blackboard variables from linked BlackboardAuthoringAssets.
  • Scrolling regression: Fixed scrolling no longer working when opening a Behavior Graph via the “Open” menu (UUM-140964).
  • Navigation nodes: Fixed NavigateToLocation and NavigateToTarget actions staying in Running status indefinitely when the destination is unreachable. Added a configurable FailIfUnreachable bool field (defaults to true) (UUM-135687).

Changelog

You can review the full changelog here:

Please pay special attention to the “Known Issues” section, as it contains important information about current limitations.

Documentation Updates

Support & Feedback

For those who missed the announcement, please see Update on Behavior Package Support and Team Presence.

As always, a big thank you for your continued feedback!

10 Likes

Can’t wait to try it out as soon as I can.

1 Like

Please note : In Unity version below 6000.5, ‘Right-click on the BehaviorGraphAgent component header > Modified Component > Apply to Prefab’ may not work due to a Unity limitation with [SerializeReference] . You can use the per-variable context menu or the top-level ‘Overrides > Apply All’ as workarounds.

Does this mean that 6.5 has better serialization system or is just bugfix?

I didn’t had time to dig into it, but when I tested on 6.5 and above, the issue was not there anymore. Would need to dig in 6.5 patch notes.

How does the OnSetup node work? When I have blackboard variable for my Enemy script and it is assigned in the graph I get an error below.

OnSetup failed on EntityAttackAction (ID: ce20fa2fe1392983bdefa90827c5b5fd): Object reference not set to an instance of an object

I am 100% sure the reference is set properly in the inspector and graph, so how come in OnSetup there is null ref?
Thanks

Mmmh. I assume your Enemy reference is set on the BehaviorGraphAgent as a blackboard override. Which makes total sense. But then this happens because the Blackboard overrides happens after Node.OnSetup is called.

We missed that basic use case unfortunately. :person_facepalming:

Thanks for raising this, we will need a new patch soon.

1 Like

Hey, huge thanks for performance improvements! It’s like a brand new asset now. And I don’t have to create a subgraph for each state now (though it does look neat).

Also you fixed issues with copying “Run subgraph” node, very nice.

1 Like

Thanks for the work on this! This release addressed a few of the specific rough edges I was running into. The new lifecycle events are a big improvement as well!

Huge praise for continuing to support this package!!!

Is the heavy weight Awake issue still present in the current version 1.0.16? I used 1.08 (or something) in the past but the runtime Awake cost is super high. I’m wondering if we can get some kind of Lazy/async loading so that we aren’t calling Awake on all the graph agents at once? Better yet, allowing the User to determine the Awake operation (to initialize the graph or not in BehaviourGraphAgent.Awake).

I think I enjoy BehaviorGraphAgent Prefab, but how does it perform? When instantiating multiple BehaviourGraphAgents of the same BehaviourGraph asset, are we saving any performance?

The last issue I wanted to mention is optional enum support (in the BG editor window). Sometimes for example I have lots of NPC states {attack, walk, …insert many many more…}, but not all states map to an active node. But my problem is the BG gets super wide because each enum takes up a space. Maybe we can hide them somehow? Determine which enums actually map to a certain action?

Thank you and I really really appreciate you guys continuing to support this package!

This patch only addresses prefab usability issues. Also, the performance hit doesn’t come from instantiating the BehaviorGraphAgent component, but the cost of instancing the runtime graph SO.

The cost of ScriptableObject instancing is still there, and the workaround is to disable the BehaviorGraphAgent component and manually controlling the lifecycle using another component wrapper. You can then manually call the lifecycle public API (Init/Start/Update/End). From there you can limit the amount of agents that calls Init to 10 per frame for instance.

The new underlying API has been refactor to a factory pattern (with BehaviorGraphAgent simply calling BehaviorGraph.AcquireInstance), so while they can’t get rid of the ScriptableObject dependency without major overhaul, the package now has a better foundation to make it happen in the future.

I don’t see that being prioritize anytime soon. You should try to split into substates. Worst case, you can create your own custom Composite/Sequence.

2 Likes

Thank you so much for fixing the lag on large graphs!! It is so smoooth now and my life has gotten so much better haha :heart: