---
title: "Creating a Finite State Machine - Live session"
content_type: tutorial
url: "https://learn.unity.com/tutorial/creating-a-finite-state-machine-live-session?language=en"
language: en
difficulty: intermediate
unity_version:
  - "2022.3"
supported_unity_versions:
  - name: "2022.3"
    url: "https://learn.unity.com/tutorial/creating-a-finite-state-machine-live-session.md?language=en&version=2022.3"
last_updated: "2026-08-04T14:24:20.000Z"
---

# Creating a Finite State Machine - Live session

Learn to design clean, extensible agent behavior in Unity by implementing finite state machines with object-oriented programming.

Finite State Machines (FSMs) are a computational model used in games to easily create complex agent behavior. They leverage Object-Oriented Programming (OOP) principles to keep complex code clean, functional, and extensible. This webinar will guide you through the process of creating agent behavior using a finite state machine in Unity.This series comprises two sessions:

- Session 1: Creating the Base
- Session 2: Creating States

This session is aimed at:

- Game Developers looking to incorporate FSMs into their projects for cleaner and more manageable code
- Programmers interested in improving their agent behavior techniques
- Technical Directors aiming to enhance their team’s capability in implementing complex behaviors

## Materials

- [FSM Project Files.zip](<https://unity-connect-prd.storage.googleapis.com/20241011/a1f47aac-0fb1-479a-83e5-8fc650f53241/FSM Project Files.zip>)

## 1. Import the starter package

1. Download the project files above.
2. Unzip the folder.
3. Create a new URP project in Unity.
4. Import the FSM 'Expert_Start.unitypackage' package into your Unity project.

## 2. Session 1 - Creating the Base

[Video](https://connect-mediagw.unity.com/h1/20241115/videos/2d0ca277-dfe7-413b-b77e-5f8a110fc3ac_GMT20241010-160010_Recording_2560x1440.mp4)

## 3. Session 2 - Creating States

[Video](https://connect-mediagw.unity.com/h1/20241115/videos/3e2ad30b-cebd-4274-b711-43cdadfb2c8f_GMT20241017-160009_Recording_2560x1440.mp4)
