Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: rechronicle on April 06, 2019, 07:53:29 AM

Title: Can't Drag Scene Object to Arrays (Global Variable)
Post by: rechronicle on April 06, 2019, 07:53:29 AM
Hello,
I was following the tutorial 'Intro to using Arrays in Playmaker' https://www.youtube.com/watch?v=yOZK8yr3IKo (https://www.youtube.com/watch?v=yOZK8yr3IKo).
In the tutorial, he can drag the object from the scene into the Array variable (2:41).

But I can't do that, instead, it requires me to put game object/prefabs from the asset folder.

This is causing the value (of GameObject inside the Array) in inspector not updating in-game, and only updates after Testing Mode ends.

Any new workflow using Arrays?
Or should I just avoid using Global Variable?

Thank you!


Haven't tried it yet with ArrayMaker. Not sure if the problem will persist.
Title: Re: Can't Drag Scene Object to Arrays (Global Variable)
Post by: djaydino on April 07, 2019, 11:11:34 AM
Hi.
You will need to populate the array @runtime if its global indeed.

But you should minimize using globals (read this wiki page (https://hutonggames.fogbugz.com/default.asp?W1462))

You can use Get/Set Fsm actions to get or set things from other fsms/gameobjects.

on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) you can find even more actions, like 'fsm bool test'  and 'fsm int add' for example.