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 on top left corner -> "Add package from git URL..."
Paste this: https://github.com/forcepusher/com.bananaparty.behaviortree.git#5.2.0
See minimum required Unity version in the package.json
file.
- Strict OOP architecture and minimalism.
- 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 currentBehaviorNode.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
ReactiveSequenceNode
andReactiveSelectorNode
.
- 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 (
ReactiveSequenceNode
), 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.
- Designed with Prediction-Rollback network code in mind.
- You can write RollbackNodes utilizing the Memento pattern.
The library assumes that you're familiar with OOP and BehaviorTrees.
There are no Samples yet, refer to the Tests folder instead.