LogoLogo
  • 🌍Welcome
    • 🀝Support & Community
    • ❓FAQ
  • QuickStart
    • πŸ•ΊAnimate Anything Quickstart
      • πŸ’ͺGetting the Best Possible Results for your Model
      • ⁉️FAQ
      • πŸ€Έβ€β™‚οΈAnimations by Category
    • πŸ¦†Generate Anything Quickstart
      • πŸ₯‡Best Practices for Best Results
      • ⁉️FAQ
      • πŸ’«Expected Results by Category
    • πŸƒβ€β™‚οΈUnity Quickstart
      • πŸ”Anything Browser
      • 🌍My World
      • πŸ€–AI Creator
    • 🚲Unreal Library Quickstart
      • 🍎MacOS Installation
      • πŸ€–AI Creator
      • πŸ“¦Importing models in a packaged project
      • 🚢Animate Anything
    • ⛰️Unreal Procedural Environments Quickstart
  • Unity
    • πŸ“¦Download SDK
      • πŸ““Unity Release Notes
        • Anything World for Unity v1.1.0.2
        • Anything World for Unity v1.1.0.1
        • Anything World for Unity v1.0.2.5
        • Anything World for Unity v1.0.2.4
        • Anything World for Unity v1.0.2.3
        • Anything World for Unity v1.0.2.2
        • Anything World for Unity v1.0.2.1
        • Anything World for Unity v1.0.2.0
        • Anything World for Unity v1.0.1.0EA
        • Anything World for Unity v1.0.0.1EA
        • Anything World for Unity v1.0.0.0EA
        • Anything World for Unity v3.1.20.1
        • Anything World for Unity v3.1.20
        • Anything World for Unity v3.1.19
        • Anything World for Unity v3.1.18
        • Anything World for Unity v3.1.17
        • Anything World for Unity v3.1.16
        • Anything World for Unity v3.1.15
      • βš™οΈTroubles Updating? Upgrade Guide
    • πŸ“„Documentation
      • 🌐AnythingWorld API
        • AnythingAnimate
          • βš™οΈAnimate
          • βš™οΈPoll
        • AnythingMaker
          • βš™οΈMake
        • RequestParameter
          • AddCollider
          • AddRigidbody
          • AddScripts
          • ClampDatabaseScale
          • IsAnimated
          • LegacyAnimatorInEditorOption
          • OnFailAction
          • OnSuccessAction
          • Parent
          • PlaceOnGrid
          • PlaceOnGround
          • Position
          • Rotation
          • Scale
          • ScaleMultiplier
          • ScaleType
          • SerializeAsset
          • SetDefaultBehaviourPreset
          • TransformSpace
        • 🌐Voice
          • CommandRequester
            • RequestCommand
            • RequestAndReturnCommand
        • 🌐Utilities
          • UtilityEnum
            • ScaleType
        • 🌐Animation
          • LegacyAnimationController
            • MovementJumpLegacyController
              • BlendAnimationOnSpeed
              • Idle
              • JumpStart
              • JumpFall
              • Land
              • Run
              • Walk
            • FlyingAnimationController
              • Fly
              • Idle
            • CrossFadeAnimation
            • PlayAnimation
            • StopAnimations
            • Wait
      • Behaviour Tree Editor
        • What is a Behaviour Tree?
        • How to use Behaviour Tree Editor
      • Path Creator
      • πŸ”¨Building Your Project
    • πŸ“šTutorials
    • πŸƒLegacy vs. Modern Animation System
    • ❗Known Issues
  • Unreal
    • πŸ“”Unreal Release Notes
      • Anything World for Unreal v1.2.0.0EA
      • Anything World for Unreal v1.1.0.0EA
    • πŸ“–Unreal Plugin Codebase: Intro and FAQs
    • πŸ”¬Packaged project runtime loading of AW models
  • REST API
    • πŸ“„Documentation
    • βš’οΈService Status
    • πŸ’…Preparing your 3D model
  • Unity Legacy Documentation
    • πŸ§“Legacy Package API References
      • πŸ“„API References (Legacy)
        • AnythingCreator
        • AnythingSpeech
        • AnythingHabitat
      • ❓Troubleshooting (Legacy)
    • πŸƒUnity Quickstart - Classic Version
    • 🎀Voice Creator - Classic Version
    • πŸ‘“Examples
  • Animate Anything 3D software plugins
    • 🧊Animate Anything Blender Add-on Manual
    • 🧊Animate Anything Maya Plugin Manual
    • 🧊Animate Anything 3D Studio Max Plugin Manual
    • 🧊Animate Anything Roblox Plugin Manual
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Unity
  2. Documentation
  3. Behaviour Tree Editor

What is a Behaviour Tree?

A Behavior Tree (BT) is a hierarchical structure that defines the decision-making process of an AI agent. It consists of nodes that represent tasks or behaviors, which are executed based on certain conditions. The tree is traversed from the root node down to the leaf nodes, with each node returning Success, Failure, or Running status. Behavior Trees help you structure the decision-making logic of your agent, making complex behaviors manageable and understandable via visual representation.

Main Concepts

1. Action Nodes

Action nodes are the leaf nodes of the Behavior Tree. They represent the actual tasks or behaviors that the AI agent can perform. When an action node is executed, it attempts to carry out a specific action, such as moving to a target, attacking an enemy, or playing an animation.

2. Composite Nodes

Organizational nodes that control the execution flow of their child nodes. There are several types of composite nodes, including:

  • Sequence: Executes its child nodes in order until one fails. If all child nodes succeed, the sequence node succeeds.

  • Selector: Attempts to execute its children one by one until one succeeds. It's used for selecting between different behaviors based on their success.

  • Parallel: Executes all its child nodes simultaneously and succeeds if a specified number of child nodes succeed.

For example you can have a "FindAndAttackEnemy" sequence node with two child nodes: "SearchForEnemy" and "AttackEnemy". The sequence node would first execute the "SearchForEnemy" node to locate an enemy. If an enemy is found, it would then execute the "AttackEnemy" node. If both child nodes succeed, the sequence node succeeds.

3. Decorator Nodes

Modifiers that alter the behavior or outcome of their child nodes. They can be used to repeat actions, invert success/failure, or conditionally execute based on certain criteria. Common types of decorator nodes include:

  • Inverter: Inverts the success/failure status of its child node.

  • Repeater: Repeats the execution of its child node a specified number of times or until a condition is met.

  • Conditional: Executes its child node only if a specified condition is true.

A repeater node can execute the "AttackEnemy" node multiple times, allowing the AI agent to perform consecutive attacks.

4. Blackboard

The Blackboard is a global data store that allows nodes to share information and state across the Behavior Tree. It acts as a key-value store, where nodes can read and write data. The Blackboard is useful for storing variables such as target positions, health values, or any other relevant information that nodes might need to access.

PreviousBehaviour Tree EditorNextHow to use Behaviour Tree Editor

Last updated 1 year ago

Was this helpful?

πŸ“„