UFSM: Finite State Machine

So SetState() have to be called in Tick() or OnAnyUpdateState()
I think what I am trying to do is to define a conditional state transition which would be executed when we are in a state to know if there is a state change.



 var fsm = new FiniteStateMachine<string>("closed", "open", "locked");
fsm.AddTransition("closed", "open", OPEN_COMMAND)    
.AddTransition("closed", "locked", LOCK_COMMAND, customTransition) // using a custom transition    
.AddTransition("locked", "closed", UNLOCK_COMMAND, () => user.HasKey()) // using a condition    
.AddTransition("open", "closed", CLOSE_COMMAND)    
.OnEnter(open, () => Debug.Log("The door is now open!"))    
OnExit(closed, HandleDoorIsNoLongerClosed);


but I understand if it is not the way to use the ufsm plugin.
thank you