A few methods to make a simple Finite State Machine (FSM)
This state mashine is is very simple. it contains 2 models from Mixamo.com and 3 animations.
so far it is just 1 guard using colliders to decide if it should track or not.
and a more complicated system where you can define what of the generic states a NPC Farmer has 3 states Wander, Search and Walk
To add more states you should create a class that inherrits from IStrate. and setup the state selection behaviour in the NPC sript.