Create Simple Enemy Behaviour with C# in Unity (Intro to AI)

Offered By
Coursera Project Network
In this Free Guided Project, you will:

Understand how to create behaviors for patrol, chase and attack.

Understand how to raise events based on given conditions for discrete behaviors.

Understand the principle of a behavior manager that can determine and switch between active behaviors.

Showcase this hands-on experience in an interview

Clock1.5 hours
BeginnerBeginner-friendly
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this one-hour, project-based course, you'll learn how to create a simple enemy behavior tree. You'll learn how to make your enemy characters patrol an area, chase a player in range and attack when it's close enough for melee. You will be able to easily expand the behavior system we create, to add your own conditional behaviors. To build a behavior tree, this guided project will use and expand upon the following Unity concepts: - Transform-based movement - Rigidbody collisions and triggers - Interfaces - Events Consider this guided project to be a "capstone" project for beginners. If you can comfortably complete this course, understand all concepts presented and can reproduce them in your own projects, then congratulations! You have officially graduated to "Intermediate!"

Requirements

This is an advanced "Beginner" course! Learners should already be fairly familiar with C#, Interfaces, Events and the Unity Interface.

Skills you will develop

Video-game DevelopmentC sharp (C#) Programming LanguageUnity 3DUnityApplication development

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Introduction and License Activation

  2. Create a Basic Patrol Script

  3. Create a Basic Chase Script

  4. Create IBehavior and BehaviorManager

  5. Declare and Raise Events when Behavior Changes

  6. Write the Attack Behavior

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.