Uploaded December 2024 | Updated September 2026, 2 weeks ago
Learn how to enhance your Enemy AI with custom detection systems using Unity's Behavior Graph! In Part 2 of this tutorial series, we'll explore how to create custom nodes and implement player detection mechanics.
In Part 2 we will cover:
- Creating custom Action nodes
- Creating custom Condition nodes
- Implementing Range Detection
- Adding Line of Sight checks
- Running nodes in parallel
- Using Abort nodes
Part 1: youtu.be/VWxgTeCtDAs
----------------
Download the Starter Project at:
patreon.com/posts/117604296
Resources:
Behavior Graph doc: docs.unity3d.com/Packages/com.unity.behavior@1.0/manual/behavior-graph.html
FSM article: gameprogrammingpatterns.com/state.html
---------------
Learn more about C# & Game Dev in Unity in my video courses at:
courses.sunnyvalleystudio.com
Join the discord:
discord.gg/RQEtYHz
You can support me through Patreon:
patreon.com/sunnyvalleystudio
Assets used:
kaylousberg.itch.io
---------------
00:00 The need to run custom Range and LoS detectors
01:21 Creating Custom Action node in Behavior graph
02:57 BlackboardVariable
04:33 Referencing custom script in Blackboard
04:56 Deleting nodes in the Behavior Graph
05:10 Stacking nodes to create Sequence
05:58 Dealing with Running Status
06:36 Running nodes in parallel
07:56 How to use Abort If node
09:18 Using Conditional Branch node
09:38 Defining Custom Condition
11:45 Using bool flags in Behavior Graph
13:59 Debugging a behavior graph
14:38 How to use Try In Order flow node
#unity3d #ai #gamdev
Learn how to enhance your Enemy AI with custom detection systems using Unity's Behavior Graph! In Part 2 of this tutorial series, we'll explore how to create custom nodes and implement player detection mechanics.
In Part 2 we will cover:
- Creating custom Action nodes
- Creating custom Condition nodes
- Implementing Range Detection
- Adding Line of Sight checks
- Running nodes in parallel
- Using Abort nodes
Part 1: youtu.be/VWxgTeCtDAs
----------------
Download the Starter Project at:
patreon.com/posts/117604296
Resources:
Behavior Graph doc: docs.unity3d.com/Packages/com.unity.behavior@1.0/manual/behavior-graph.html
FSM article: gameprogrammingpatterns.com/state.html
---------------
Learn more about C# & Game Dev in Unity in my video courses at:
courses.sunnyvalleystudio.com
Join the discord:
discord.gg/RQEtYHz
You can support me through Patreon:
patreon.com/sunnyvalleystudio
Assets used:
kaylousberg.itch.io
---------------
00:00 The need to run custom Range and LoS detectors
01:21 Creating Custom Action node in Behavior graph
02:57 BlackboardVariable
04:33 Referencing custom script in Blackboard
04:56 Deleting nodes in the Behavior Graph
05:10 Stacking nodes to create Sequence
05:58 Dealing with Running Status
06:36 Running nodes in parallel
07:56 How to use Abort If node
09:18 Using Conditional Branch node
09:38 Defining Custom Condition
11:45 Using bool flags in Behavior Graph
13:59 Debugging a behavior graph
14:38 How to use Try In Order flow node
#unity3d #ai #gamdev










