Overview | Key Features | Videos | Documentation | Samples | Add Ons | Support

Behavior Designer is designed with performance in mind. During its runtime, Behavior Designer's behavior tree implementation uses a data oriented design instead of an object oriented design. This reduces the number of cache misses so the behavior tree runs faster. In addition, after the behavior tree has started executing no new heap allocations are made within Behavior Designer. With these optimizations, Behavior Designer runs very, very fast. We ran tests with thousands of behavior trees running at once. In practical situations you would never run thousands of unique behavior trees but the tests below show how fast Behavior Designer really is. These tests were performed on a PC built in mid-2011: 3.4 GHz with 16GB of RAM on Windows 7. The following behavior tree was used:

Behavior Tree Used

The profiler below shows the results. The Behavior Manager component was selected because all of the behavior trees are run from that GameObject.

1 behavior tree
1 Behavior Tree

10 behavior trees
10 Behavior Trees

50 behavior trees
50 Behavior Trees

200 behavior trees
200 Behavior Trees

1,000 behavior trees
1,000 Behavior Trees

2,000 behavior trees
2,000 Behavior Trees

4,000 behavior trees
4,000 Behavior Trees

We tried to test 16,000 behavior trees but Unity crashed before we could even hit the play button.