Unity : AI && NavMesh [FSM : (Finite State Machine with Enum)]

NOTE : there is an incredibly useful shortcut to create switch statement with all the cases inside.

Type sw and Intellisense understand we want a switch statement, then press TAB two times, it opens a full declaration

Now inside we pass our variable _currentState, and press two times Enter

Really good shortcut!

if the Coroutine is called before it finishes executing its code, it resets itself from the beginning.

--

--

--

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CDC USING DEBEZIUM SERVER, MYSQL, KINESIS

GXChain Progress Report April.19-April.25

Data Structure & Algorithms — 2. Object-Oriented Design

Recursion — A concept and an example

recursion visualized

A Fundamental Flaw in Using Software Patterns

How to move your git repository into a monorepo without loosing its history

How to discover spontaneity as a Software Engineer at a startup

Automating LVM using Python Script

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Matteo Lo Piccolo

Matteo Lo Piccolo

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!

More from Medium

How to Build an Interactive Security Camera System in Unity

Unity : Cinemachine and Timeline (Part IV)

Upgrading to the Universal Render Pipeline (URP)

Getting Started with Terrain Tools in Unity Part 1: Interface and Mesh Sculpting