playMaker

Author Topic: Dragging Game Object into Variables Confuses Templates  (Read 270 times)

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 35
Dragging Game Object into Variables Confuses Templates
« on: April 24, 2022, 02:10:10 PM »
Greetings.

I'm in Unity 2021 and Playmaker 1.9.4

I recently learned I can drag gameobjects from hierarchy into variables tab on FSM, and it automatically creates the gameobject variable. That's pretty cool.

However, if I want to use that variable on a template input, it doesn't see them. It makes me go to 'convert' to add them. But, it doesn't really add them. If I leave the state, and go back, its empty.


AbeDieckman

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Dragging Game Object into Variables Confuses Templates
« Reply #1 on: May 19, 2022, 12:30:03 AM »
Same. So far as I can tell, templates only really work in very specific use cases in which an object doesn't interact with other objects. It's... weird.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6951
    • jinxtergames
Re: Dragging Game Object into Variables Confuses Templates
« Reply #2 on: May 19, 2022, 09:37:11 AM »
Hi.
On older PM versions (1.9.0) if you drag in a game object the type would show as an "Object" not GameObject.

i just did a test on the latest version and it shows as a GameObject.
BUT if you open the types you will see that nothing is 'Checked'



and when you change it (setting to gameObject) it will make the variable empty.



So the variable shows as a 'Game Object' but actually is a 'UnityEngine.GameObject' and not a 'FsmGameObject'

i will ping Alex, i think that if you drag in a gameobject instead of a component that it should automatically be set as a FsmGameObject.