Get the current state of an entity's state machine.
ECS instance (structural typing)
Entity to query
The current state string, or undefined if entity has no stateMachine
Get the current state of an entity's state machine.