UHFPS
  • 👋Welcome
  • 🎲Installation
    • URP - Project Setup
    • HDRP - Project Setup
    • Packages Setup
  • 🎮Getting Started
    • References
  • ⬆️Update Process
  • 📑Changelog
  • 📍Roadmap
  • ❔Support
  • 📚Guides
    • Managing Inputs
      • Adding Inputs to UI
      • Setting up Input System
    • State Machines
      • Adding Player States
      • Adding AI States
    • Save/Load Manager
      • Previous Scene Persistency
      • Encryption
    • Customizing UI
    • Interactions
    • Inventory
    • Player Items
    • Dynamic Objects
    • Motion Controller
      • External Motions
    • Hiding System
    • Narration System
    • Jumpscares
    • Puzzles
    • Objectives
    • Cutscenes
    • Options Manager
    • Game Manager
    • Localization
    • URP Specific
  • ⚙️Integrations
    • Emerald AI 3.0
    • AI Tree
    • Meet and Talk
Powered by GitBook
On this page
  1. Guides

State Machines

PreviousSetting up Input SystemNextAdding Player States

Last updated 1 year ago

In Unity, a Finite State Machine (FSM) can be used to manage movement and other behaviors of game characters or objects. FSM is a computational model that consists of a finite number of states, transitions, and actions. It works by transitioning from one state to another based on input or other conditions, performing specific actions associated with each state.

Instead of creating a single script that handles all movement or behavior for a game object, we can implement a more modular approach by breaking down states into smaller, individual scripts that implements Finite State Machine (FSM) methods. This approach leads to a cleaner and more maintainable solution, as it allows for easier addition and management of new or existing states.

📚
Finite State Machine
Cover

Adding Player States

Cover

Adding AI States