Unity package. Fully cross-platform Behavior Tree.
Does not reference Unity Engine, so it could be used in a regular C# project.
Make sure you have standalone Git installed first. Reboot after installation.
In Unity, open "Window" -> "Package Manager".
Click the "+" sign at the top left corner -> "Add package from git URL..."
Paste this: https://github.com/forcepusher/com.bananaparty.behaviortree.git#6.0.0
See minimum required Unity version in the package.json
file.
- Code-oriented. Built using best OOP practices.
- Trees are built by using nested constructors. Beware, it's all code.
- There are only 2 node callbacks,
OnExecute
andOnReset
.- Determining whether a node just started executing in
OnExecute
or being interrupted inOnReset
is accomplished by comparing the currentNode.Status
.
- Determining whether a node just started executing in
- Reactive Evaluation/Conditional Aborts/Observer Aborts are implemented similarly to how it's done in NodeCanvas rather than in BehaviorDeisgner or UnrealEngine.
- It's as simple as all nodes being reevaluated every frame in
ReactiveSequence
andReactiveSelector
.
- It's as simple as all nodes being reevaluated every frame in
- No separation between Actions and Conditions.
- In case of multiple Actions in a self-interrupting Sequence (
ReactiveSequence
), you would need to group them togehter into an additional Sequence, so Actions aren't starting from the beginning every frame.
- In case of multiple Actions in a self-interrupting Sequence (
- No such concept as a Blackboard.
- Inject the classes (or their interfaces) you need to mutate via constructor. However, you can still write a DTO and use it as a Blackboard.
- Text-based visualization.
- Execution status of an entire tree could be viewed in a build.
The library assumes that you're familiar with OOP and BehaviorTrees.
There are no Samples yet, refer to the Tests folder instead.