Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: mrphilipjoel on April 24, 2022, 02:10:10 PM

Title: Dragging Game Object into Variables Confuses Templates
Post by: mrphilipjoel 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.

Title: Re: Dragging Game Object into Variables Confuses Templates
Post by: AbeDieckman 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.
Title: Re: Dragging Game Object into Variables Confuses Templates
Post by: djaydino 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'

(https://i.imgur.com/1TtmOEG.png)

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

(https://i.imgur.com/m8BubP5.png)

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.