AI Tree - Behaviour Tree for Unity

Create complex AI behaviors using a lightweight and intuitive graph system!

Get in the Asset Store!

AI Tree features a unique decorator and service system that allows you to create more complex graphs without losing functionality. For example, creating an interesting NPC using a standard graph system can require up to 30 nodes, while AI Tree allows you to achieve the better result with just 5 nodes. This saves time and simplifies the AI creation process.

:heavy_check_mark: NO DLL’s: All code are written in C# and open for modifications.
:heavy_check_mark: Official detailed youtube lessons: YouTube
:heavy_check_mark: Detailed documentation: Documentation
:heavy_check_mark: Active real-time support: Discord

One of the main advantages of AI Tree is the powerful perception and environment query systems. These systems enable you to create incredibly lifelike AI behavior that adapts to changing environments and interacts with other objects in the game world.

AI Tree provides a convenient and intuitive interface for creating AI using nodes. This tool will help you quickly create complex behaviors and reactions for your characters, as well as configure them for different scenarios.

PLAY DEMO | GAME READY SAMPLES

Documentation | YouTube | Discord | Twitter

:sparkles: Unique Features

  • Environment Query System!
  • Perception System!

:sparkles: Main Features

  • Intuitive visual tree graph!
  • Over 175 built-in nodes!
  • Ability create custom nodes, decorators and services!
  • Parallel nodes support!
  • Global and local variables!
  • Visual runtime debugger!
  • Extensive documentation and videos!
  • Source Code Included!
  • Powerful API!

:sparkles: Integrations

  • Adventure Creator
  • A* Pathfinding Project Pro
  • Dialogue System for Unity
  • Mirror Network
  • Photon PUN 2 Network
  • Playmaker
  • SensorToolkit 2
  • Ultimate Horror FPS KIT
  • More coming…

Screenshots

Hi @TamerlanShakirov
A question on the tool If I may. Can I use the tool to create flying AI? Also is it also usable for nonhumanoid characters?
How about the extensibility of the Tree graph? Can we create extensions on its current capabilities?
Thank you,

Hello, of course you can, AI Tree extremely expandable, it means you can add custom nodes, decorators and ect!

About flying AI, good idea, at the moment we don’t added this node in AI Tree, we defently add it in future updates, also you can do it yourself!

Thank you for the answers :slight_smile: Appreciate it a lot. Will play around with it more this weekend.

Released new update version 1.1.0!
Release notes

Added

  • Local key, create local key without adding it in blackboard.

  • Default Self key in blackboard.

  • Cache of node types, reduced response time of the search window in the tree graph.

  • 37 new tasks:

  • Instantiate task.

  • Destroy task.

  • LineCast task.

  • RayCast task.

  • SphereCast task.

  • BoxCast task.

  • CapsuleCast task.

  • LineCast task.

  • RayCast task.

  • CircleCast task.

  • BoxCast task.

  • CapsuleCast task.

  • AddExplosionForce task.

  • AddForce task.

  • AddForceAtPosition task.

  • AddRelativeForce task.

  • AddRelativeTorque task.

  • AddTorque task.

  • MovePosition task.

  • MoveRotation task.

  • Sleep task.

  • WakeUp task.

  • AddForce task.

  • AddForceAtPosition task.

  • AddRelativeForce task.

  • AddTorque task.

  • MovePosition task.

  • MoveRotation task.

  • Sleep task.

  • WakeUp task.

  • PlayClipAtPoint task.

  • Animaton CrossFade task.

  • Animaton CrossFadeInFixedTime task.

  • Animator SetFloat task.

  • Animator SetBool task.

  • Animator SetInteger task.

  • Animator SetTrigger task.

Updated

  • Default key colors in blackboards.
  • Menu items order.
  • Node descriptions (support local key).

Fixed

  • Bug with search window, when adding two same ending folder.

AI Tree 1.1 Feature Highlights!

Hello,
I wanted to ask whether custom nodes uses UnitySerialization or your Custom Serialization?
I’m currently using NodeCanvas which has its own serializer and I have problem with Using SerializeReference Attribute.
I have a custom task called CastSkill and I want it to have Skill field which is an Interface and can have multiple subclasses. I want my custom task inspector to display correctly each subclass properties when I pick them.
Does SerializeReference works in your plugin?
Thank you

Hello, yes AI Tree support [SerializeReference] attribute and all built-in Unity attributes. AI Tree uses Unity serialization.

Thank you for your reply, I will consider buying your asset :slight_smile: it looks really cool, especially when coming from Unreal Engine, And If i Understand correctly the Parrarel Nodes are like Services in Unreal Engine yes?

Updated documentation for AI Tree! Check out with new version!

Released new update version 1.1.1!
Release notes

Added

  • Manual save and auto save mode.

Fixed

  • Bug with initializing sync keys.

Hi,
(1) I seem to be unable to delete keys in the blackboard once created. I.e there is a “new key” button for creating them but can’t find any “delete key”… pressing backspace or del on my keyboard also doesn’t work.

(2) Regarding the “parent” field for keys, the documentation says “Parent in this field, you can put a parent Blackboard from which all its keys will be available.”. In that case, this is a property of the blackboard, not the individual keys. Why is this field set in the “key” window panel and not the blackboard panel?

(3) Could you add to your documentation examples of the [ShowIf()] attribute? in particular not clear what types of comparer statements are valid… e.g how to do ShowIf( myInt, “>3”)?

Hi @TamerlanShakirov . Could I get some assistance in deleting a key from a blackboard?

New video tutorial about Perception System in AI Tree!

New video tutorial about Environment Query System!

Release new huge update 1.2!

One of the main advantages of new update is the powerful perception and environment analysis systems. These systems enable you to create incredibly lifelike AI behavior that adapts to changing environments and interacts with other objects in the game world.

Release notes

Added

  • Environment Query system.
  • Voice communication between AI’s.
  • Apex integration.
  • Vector2, Long, Short keys.
  • Graph mini-map.
  • Playground demo.

Updated

  • AITree.Perception namespace deprecated, use AITree.PerceptionSystem instead.
  • AITree.DetectionSignals namespace deprecated, use AITree.PerceptionSystem instead.
  • AITree.Keys namespace deprecated, use AITree instead.
  • Save button in Behaviour Tree editor window.

Fixed

  • Collection nodes in groups.

Try new Environment Query System!

Release new huge update 1.3!
Release Notes
[spoiler]
[/spoiler]
Release Notes

Added:

  • AI Way system for static pathfinding.

  • Custom update mode by specified ticks.

  • Conditional loop decorator.

  • Compare blackboard keys decorator.

  • Object tag conditional decorator.

  • Cone check decorator.

  • Is at location decorator.

  • One time execution decorator.

  • NavMesh has path decorator.

  • Blackboard methods:

  • bool Contains();

  • bool TryGetKey(name, out Key);

  • bool TryGetKey(name, out T) : T is Key;

  • bool TryFindKey(name, out Key);

  • bool TryFindKey(name, out T) : T is Key;

  • Abstract ConditionDecorator class to create custom conditional decorators.

  • Handler for identical names in blackboard.

  • Context delete button in blackboard.

  • Open sub behaviour of RunBehaviour task by double click.

  • Add node creation by releasing edge.

  • Environment Query System sampling.

Updated:

  • Improved speed of behaviour tree editor.
  • GUI drawing of inspector.
  • Loop decorator.
  • Time Limit decorator.
  • KeyDetailsWindow, remove ‘Entry’ prefix from fields.
  • Removed obsolete types and assemblies.

Fixed:

  • Empty blackboard.
  • A* Pathfinding Project integration.
  • Processing multiple observer decorators.
  • Selection decorator at runtime.

Question: Does the decorator IsAtLocation return true if I use position and 0.5 when the BTObject is within the range? What does the Vector represent in the blackboard condition?
Will it return true if position of the BTObject is within a distance of 0.5 of the Target? I don’t understand how you are to perform logic with your system. There is no indication what is left or right of the comparator. I assume left of the comparator is the BTObject (gameobject with BT) but doesn’t the position refer to the BTObject position not the Target? Do I have to add a blackboard variable and set it to the targets position? If so how? I have zero clue how to set a blackboard key value to the target’s position soI can compare the values.

Why don’t you have documentation? Tooltips would suffice in most cases. Your documentation is lacking any of the decorators except for 3 of them. It’s time consuming having to guess and use trial and error. It also cost you support cycles which cost you money. It would be great if we could answer our own questions using the docs.

Hi, Check out our tutorials they very much describe the principle of operation of all major systems in detail.
As for the text documentation, the update came out a few days ago and the documentation just didn’t have time to update. We will add new changes in the coming days.

I highly recommend watching the video tutorials about AI Tree.