I have created a custom state for one of my SFM’s. And I wanted to use GetComponent in it. But it seems that I can’t.
I had to get the object by tag before it would work.
Is not the owner of the FSM the GameObject that I access from a custom state? Is there a way to get the gameobject of the FSM from inside a custom state?
From within an FSMState you get access to the FSM itself with the ‘graph’ property and you get access to the agent of the FSM (which 99% is the FSMOwner) with the ‘graphAgent’ property.
Keep in mind that the FSMOwner and the FSM itself live on different game objects.