Uploaded August 2023 | Updated September 2026, 2 hours ago
Go to this video's Sponsor: https://snhu.edu/llamacademy to see what the current average annual salary for a game developer programmer is and learn how you can get started!
Learn how you can implement Enemy AI with a Behavior Tree!
This is a full implementation using AI Tree (assetstore.unity.com/packages/tools/behavior-ai/ai-tree-229578?aid=1101l9QvC), a powerful Behavior Tree framework with advanced features like Environment Query System (EQS) and a Perception System.
While we're using AI Tree specifically in this tutorial, you can use virtually any Behavior Tree framework to get similar results for this use case.
A special thank you to Renowned Games for the copy of AI Tree used in this tutorial ๐งก!
๐ถ ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out ๐
๐จโ๐ป Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/ai-series-part-48
๐ท๏ธSave 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly
๐ Resources:
๐ AI Tree: assetstore.unity.com/packages/tools/behavior-ai/ai-tree-229578?aid=1101l9QvC
๐ The Quirky Llama: assetstore.unity.com/packages/3d/characters/animals/mammals/llama-quirky-series-178234?aid=1101l9QvC
๐ Unity Particle Pack: assetstore.unity.com/packages/vfx/particles/particle-pack-127325?aid=1101l9QvC
๐ A more scalable way to define enemy stats: youtu.be/PoglGJoDcZg
๐ The same Enemy AI implemented with a Finite State Machine: youtu.be/jnETyJUiCiM
๐ Not sure which AI Behavior Framework to use? Check out my comparison video: youtu.be/CZvfuNfdc1M
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Topic Introduction, What to Expect
01:54 Initial Setup of Behavior Tree & Blackboard
03:10 Idle Branch
06:08 Sponsor - Southern New Hampshire University
07:49 Chase Branch
11:14 Detect Players - PlayerSensor.cs
11:49 Catch Events & Feed Blackboard Chasing Data - Enemy.cs
14:33 Hook up References, Physics Setup, & Demo Chase
16:51 Melee Attack Branch
19:08 Feed Blackboard Melee Attack Data - Enemy.cs
22:14 Simple Damaging in Player.cs
22:39 Melee Scene Configuration & Demo
23:37 Prevent Moving while meleeing
24:13 Spit Attack Branch
26:00 Spit Projectile - Spit.cs
26:59 Spit Projectile Prefab
27:29 Feed Blackboard Spit Attack Data - Enemy.cs
29:59 Spit Scene Configuration & Demo
30:36 Bounce Attack Branch
32:09 Feed Blackboard Bounce Attack Data - Enemy.cs
32:51 Bounce Scene Configuration & Demo
33:16 Roll Attack Branch & Impact Sensor Object
34:32 Detect Rolling Collisions - ImpactSensor.cs
34:59 Roll Attack Branch Continued
36:51 Feed Blackboard Roll Attack Data - Enemy.cs
38:43 Roll Scene Configuration & Final Demo
39:26 Closing Thoughts, Support LlamAcademy
Go to this video's Sponsor: https://snhu.edu/llamacademy to see what the current average annual salary for a game developer programmer is and learn how you can get started!
Learn how you can implement Enemy AI with a Behavior Tree!
This is a full implementation using AI Tree (assetstore.unity.com/packages/tools/behavior-ai/ai-tree-229578?aid=1101l9QvC), a powerful Behavior Tree framework with advanced features like Environment Query System (EQS) and a Perception System.
While we're using AI Tree specifically in this tutorial, you can use virtually any Behavior Tree framework to get similar results for this use case.
A special thank you to Renowned Games for the copy of AI Tree used in this tutorial ๐งก!
๐ถ ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out ๐
๐จโ๐ป Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/ai-series-part-48
๐ท๏ธSave 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly
๐ Resources:
๐ AI Tree: assetstore.unity.com/packages/tools/behavior-ai/ai-tree-229578?aid=1101l9QvC
๐ The Quirky Llama: assetstore.unity.com/packages/3d/characters/animals/mammals/llama-quirky-series-178234?aid=1101l9QvC
๐ Unity Particle Pack: assetstore.unity.com/packages/vfx/particles/particle-pack-127325?aid=1101l9QvC
๐ A more scalable way to define enemy stats: youtu.be/PoglGJoDcZg
๐ The same Enemy AI implemented with a Finite State Machine: youtu.be/jnETyJUiCiM
๐ Not sure which AI Behavior Framework to use? Check out my comparison video: youtu.be/CZvfuNfdc1M
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Topic Introduction, What to Expect
01:54 Initial Setup of Behavior Tree & Blackboard
03:10 Idle Branch
06:08 Sponsor - Southern New Hampshire University
07:49 Chase Branch
11:14 Detect Players - PlayerSensor.cs
11:49 Catch Events & Feed Blackboard Chasing Data - Enemy.cs
14:33 Hook up References, Physics Setup, & Demo Chase
16:51 Melee Attack Branch
19:08 Feed Blackboard Melee Attack Data - Enemy.cs
22:14 Simple Damaging in Player.cs
22:39 Melee Scene Configuration & Demo
23:37 Prevent Moving while meleeing
24:13 Spit Attack Branch
26:00 Spit Projectile - Spit.cs
26:59 Spit Projectile Prefab
27:29 Feed Blackboard Spit Attack Data - Enemy.cs
29:59 Spit Scene Configuration & Demo
30:36 Bounce Attack Branch
32:09 Feed Blackboard Bounce Attack Data - Enemy.cs
32:51 Bounce Scene Configuration & Demo
33:16 Roll Attack Branch & Impact Sensor Object
34:32 Detect Rolling Collisions - ImpactSensor.cs
34:59 Roll Attack Branch Continued
36:51 Feed Blackboard Roll Attack Data - Enemy.cs
38:43 Roll Scene Configuration & Final Demo
39:26 Closing Thoughts, Support LlamAcademy










