EASY Unity Enemy AI using a State Machine @git-amend
EASY Unity Enemy AI using a State Machine  @git-amend
Uploaded July 2023 | Updated September 2026, 8 hours ago
Today we're implementing Enemy AI in Unity using our State Machine and the Strategy programming pattern. The goal today is to get enemies to detect players, chase them around and start attacking! Towards the end of the video, we'll talk more about our project setup tool, how to import Unity packages in code, and how to make your own package!

🔔 Subscribe for more Unity Tutorials youtube.com/@git-amend

#unity3d #gamedev #indiedev #3dplatformer

▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬

0:00 Intro
0:45 AI Navigation
2:15 Enemies!
5:00 Base State
7:25 Wander State
10:30 Chase State
11:30 Player Detector
12:51 Detection Strategy
19:20 Attack State
22:30 Importing Packages using Code
25:30 Outro

*Source code:* github.com/adammyhre/3D-Platformer.git

*Documentation About Building Your Own Packages*
docs.unity3d.com/Manual/upm-manifestPkg.html
docs.unity3d.com/Manual/cus-layout.html

*Open Source Used In This Video*
github.com/KyleBanks/scene-ref-attribute.git
github.com/starikcetin/Eflatun.SceneReference.git

*Assets Used In This Project* (Affiliate Links)
Dungeon Mason Tiny Hero Duo (FREE): assetstore.unity.com/packages/3d/characters/humanoids/rpg-tiny-hero-duo-pbr-polyart-225148?aid=1101lw3sv
Dungeon Mason Monster Buddies (FREE): assetstore.unity.com/packages/3d/characters/creatures/rpg-monster-buddy-pbr-polyart-253961?aid=1101lw3sv
Selection History Tool (FREE): assetstore.unity.com/packages/tools/utilities/selection-history-184204?aid=1101lw3sv
Cartoon Remaster VFX (FREE): assetstore.unity.com/packages/vfx/particles/cartoon-fx-remaster-free-109565?aid=1101lw3sv
Casual Game SFX (FREE): assetstore.unity.com/packages/audio/sound-fx/free-casual-game-sfx-pack-54116?aid=1101lw3sv
Ultimate Low Poly Pack: assetstore.unity.com/packages/3d/props/low-poly-ultimate-pack-54733?aid=1101lw3sv
DOTween (FREE): assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676
DOTween (Pro): assetstore.unity.com/packages/tools/visual-scripting/dotween-pro-32416?aid=1101lw3sv

*Follow me!*
https://linktr.ee/gitamend
EASY Unity Enemy AI using a State MachineUnity Tricks They Don’t Tell You: CullingGroup API for Smarter ObjectsGet Started with Custom Unity Packages (Step by Step)Stop Bad RNG | Build a Pity SystemDon’t Let These 4 Code Smells Ruin Your Unity GameUnity Playables is Actually a Game-ChangerUI Toolkit Runtime Data Binding and LogicUsing Octrees and A* for Efficient PathfindingRadial Menu Systems in Unity | Shapes, Gradients & InteractionZLinq Revolutionizes Unity Game Development With ZERO ALLOCATIONSEASY Stats and Modifiers in Unity | Broker Chain PatternUnleashing the Power of Event Channels in Unity
git-amend |

EASY Unity Enemy AI using a State Machine

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER