Hello, dear Unity Developers!
First of all, thank you for developing such a cool feature as Behavior Graph.
In this post, I collected several bugs and imperfections that I found during the work with this feature.
-
No automatic scrolling of the Behavior Graph space when making a connection from one node to another.
Sometimes graphs are too big to fit into one 1920x1080 monitor and if zoom out, they are too small to see the names. If I have a graph that is growing vertically, it will be hard to make a connection from higher to lower nodes because the graph doesn’t scroll when the cursor is at the lowest point. Here is an example:
That would be cool if the Behavior Graph space scroll automatically in the direction of your cursor. -
Imperfect Context Menu Search
Context menu search does not search if no space characters are present. Here is an example of On Start event with space and without space character:
With space - found
Without space - not found
That would be cool if you introduce 2 steps search - one with spaces and another without spaces. -
Bad Performance in Behavior Graph Editor
In the gif below you can see that I have no big graph and when I zoom in and drag a node, the node is moving with a low frame rate.
And CPU load is about 8% during these actions.
I am sure it’s not about my computer, my computer is not that bad, here are the specs of it:
CPU: AMD Ryzen 7 3700X
RAM: DDR4, 48 GB
GPU: GTX 1050Ti (yes, this one is bad, but it works fine with other Unity graphs)
Would be cool if you have a time to fix it. -
NodeModules
I checked the code of the Behavior Graph and found one cool feature there - Node Modules. With this thing, it’s possible to manipulate with types like it’s done in the Set Variable Value node. For instance, if I set a variable to the “Set Variable Value” node, the value type will automatically convert to the type of my variable. This is done with the help of Node Modules.
It would be very cool if users could also use this feature to create their custom modules. -
OnAwake() in Nodes
I noticed that there is no OnAwake() method in the Node class. If I want to save some global instance in the node and never instantiate it again in the node OnStart(), for performance reasons, it would be cool to have a method that is called just once.
But it’s not the most important thing since I can simulate this with the help of inheritance + IsInitialized bool. -
Wrong priority on search results in the Context Menu
If I write “On Start” in the Context Menu, the first result will be “Start On…” instead of the “On Start”:
-
Drag & Drop of Blackboard Variables
When I Drag & Drop blackboard variables into the Graph’s space, nothing happens. But it would be cool if we see the possible actions that we can do with this variable. Or, at least, for simple types, just call the “Set Variable Value” node:
-
Behavior Graph Zoom and Position Reset
When switching between Behavior Graph tabs, if one of them was zoomed in or just placed in a certain position, after the switch to another the position and zoom will be the same, which is good because I can quickly switch tabs and continue work where I left. But when you press the Play button and test what you just done, all the Graphs will reset their positions and zooms.
I understand that this is because all the editor classes will be recreated again and pre-play data will be lost, but if you have a big graph, it’s time-consuming to find where you have been.
Could you please keep the zoom and position values somewhere in the temp files and reset them only on the editor start? -
Duplicating of Send Event
I noticed that duplicating of Send Event with assigned variables will cause the missing of these variables if the game runs of focus on Unity Engine is lost:
Duplicated event when focus is still on Unity:
Duplicated event after focus lost:
This is possibly related to this issue: Copy-Paste or Duplicating nodes will not copy literal values
You can lose focus by clicking on another app. -
Drag & Drop From Project View Window Is Not Possible
If you have some kind of a scriptable object to set in the action/condition, it will be not possible to Drag and Drop your scriptable object from the Project Window (where you usually see folders and assets) to the Behavior Graph.
It’s possible only to press the link button in the action itself:
Would be cool if I could Drag & Drop it directly to the Behavior Graph. -
Attributes do not affect the Inspector of the Behavior Graph
I noticed that Attributes do not affect BlackboardVariable with even some primitive types.
I cannot set Min/Max/Range for values, which limits me:
Would be cool to see this fixed if you have a time. -
Double-Click on a Subgraph does not open the Subgraph in the Behavior Graph Editor
This is very inconvenient since I have to find this Subgraph in the project folders. But would be cool to have the Double-Click feature on it in order to instantly open it in the Behavior Graph Editor.
-
Condition Branch/Guard Lack of Functionality
I noticed that if I have a condition like “IsDead”, I cannot easily turn it into the Is Not Dead within the same condition node. It would be very cool to have a Drop Down on each condition to select what you expect from this condition. Here is an example:
-
No OnEnd Event Node
In Behavior Graph, there is the OnStart event, but there is no OnEnd. But in my opinion it’s very useful to have it. Imagine that in a Subgraph in the OnStart we initialized or enabled some systems/detectors in the game, but an outer flow (the one that ran this Subgraph) decided to Interrupt the current branch and switch to another one. But since you are not in the Subgraph anymore, you don’t need the initialized/enabled systems/detectors. And in the current implementation, you have to find a place where to put these deinitialize/disable flows. But if we have the OnEnd event node, we would keep it in the Subgraph, not exposing details of it and not increasing the complexity of the Graph.
Would be really cool to have it in the Behavior Graph. -
Wait Until Condition
I noticed that Behavior Graph has no flow node named “Wait Until Condition”. But it would be very useful: to pause the flow until something has not happened yet and continue it when happened.
It’s possible to do it right now with the help of a bool blackboard variable + RepeatWhile + Condition + Set Bool Variable. But as you can see, it requires more actions than just the “Wait Until Condition” node.
If you have time, that would be a cool node to implement.
I would be very happy if you decide to fix them
Platform: Windows 10
Behavior Version: 1.0.7
Unity Version: 6000.0.25f1
Thank you very much!