Access "Owner" from custom state

NodeCanvas Forums General Discussion Access "Owner" from custom state

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9346

    Hello.

    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?

    Br. Mikael Gyth.

    #9348
    Gavalakis
    Keymaster

    Hello,

    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.

    Is that what you mean?

    Join us on Discord: https://discord.gg/97q2Rjh

    #9347

    Yes.
    That was it. Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.