Discover AI and State Machines in Unity
Develop your first state machine from scratch, and program smart enemies for your games.
- 1.7 Hours of Video
- Certificate of Completion
- Source Code
- Closed Captions
Benefits
- On-demand, 24/7 access
- 1.7 hours of video
- Certificate of completion
- Source code and PDF notes
- Closed captions
Overview
In this course, you will learn the basics of AI and State Machines in Unity through this step-by-step guide to putting together an Enemy AI.
Your Enemy AI will:
- Wander randomly until a player gets close
- Chase players within a certain range
- Attack players within close range
- Return to its wandering state when players get far enough away
You will learn to achieve this with a very simple but extensible State Machine, which you will be shown how to write from scratch. Additionally, you will be guided through setting up the animations, along with simple attack and health systems which are displayed in the UI.
With concepts that can be transferred to a wide range of different game types and scenarios, this course enable you to create more complex and immersive games than ever before.


Learn with fully authorized courses
This curriculum has been extensively reviewed and authorized by Unity Technologies, the company behind the Unity Engine.
As an Authorized Learning Partner, our approved Unity courses satisfy the highest standards in terms of both quality and relevancy.
Frameworks and tools covered: Unity 2018.1
Your Courses, Your Way
All of our project-based courses are designed to be flexible – you can access courses 24/7 to fit them around your schedule, and choose the learning materials that suit you best.
You can even download your course videos and watch them offline using the Zenva app, available on iOS and Android.
Learn from World-Class Instructors
Our course instructors participate in elite developer programs and have been recognized for their demonstrated excellence in development and teaching.
That way, you can be confident that you’re learning the most up-to-date content from industry experts.

Interactive Lessons with Codemurai
Our unlimited access package comes with free access to all of the courses in our mobile app, Codemurai!
Available on iOS and Android, it’s full of interactive programming lessons and exercises so you can continue your learning on the go.
Achieve Real Results
Our community of 1,000,000+ learners and developers have used the skills learned with us to publish their own games and websites, land their dream jobs, and even start their own businesses – and you have the potential to do the same!
Check out what our learners think below:
I love the lectures, concise course objectives, and how they not only teach you enough to get started, but prepare you for the advanced stuff later down the road.
⭐⭐⭐⭐⭐
– Mihir Patel
With Zenva, I started learning a more accurate way to approach problems and develop solutions. It’s full of interesting topics that I love to learn in conjunction with my work.
⭐⭐⭐⭐⭐
– Monica Mancusi
I chose Zenva because of the large selection of topics and the fact that I can choose what courses I want to take whenever I want to take them. That level of freedom is unique to Zenva.
⭐⭐⭐⭐⭐
– Craig Bickford
The Unity courses at Zenva helped me achieve a level of comfort with game development that I didn’t think was possible. They give you the confidence to expand your skills, and were so easy to understand.
⭐⭐⭐⭐⭐
– Andrea Cardenas-Roeder
Lessons
Requirements
- Intermediate Unity Skills
- No Experience with AI is required
OR access ALL Zenva courses with our subscription.
- Access all 250+ courses
- New courses added monthly
- Cancel anytime
- Certificates of completion