Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Michaelb on October 08, 2016, 05:52:51 PM
-
Greetings to all.
I have a little problem here.
I have a ui button and 3 game objects and i want when 1 object is selected in runtime and then the button is clicked the selected object does something , plays its animation for example.
Problem is that those 3 objects are imported from runtime with a unity store asset.
So whatever fsm must be on the button.
I cant figure out the on object selected part.....
Closest thing is Game object is active on Hierarchy but since 3 objects are imported in runtime it must find automatically which object is active on Hierarchy.
Right now with existing Game object is active on Hierarchy user must assign the game object.
Can we please make a mod to auto find which object is active on Hierarchy?
Thank you in advance
Michael.
P.S
@jeanfabre
-
Hi,
When you create in runtime an object you should store it into a variable or an array.
Then you can use a custom action called 'Is Active' on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
-
Thank you very much for the reply.
Tried that allready (with variable) , but problem is that i import several items and the importer (asset) is only one , so it gives the same var to all when it imports them.
Will try with array and post back.
Much appreciated for the help.