Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: superdoompanda on November 21, 2016, 03:20:42 PM

Title: Get instance gameobject name and store in array
Post by: superdoompanda on November 21, 2016, 03:20:42 PM
Hello,

I'm trying to figure out a problem and I wondered if anyone could help.

I've setup a manager to manage particular game objects in a scene. Currently, I've done it from a very hacked together way of using event sending, although this breaks (as soon as the prefabs deleted) as my game objects are prefabs. whilst I'm still getting to grips with Playmaker.

What I want to do is the manager to get each instance name from the game objects in the scene and store them in an array to refer to later.

I've come across Get FSM Gameobject. However what I'm not sure about is how to get each game object to send it's instance name to the manager, so it can be stored in an array.

Any help greatly appreciated
Title: Re: Get instance gameobject name and store in array
Post by: superdoompanda on November 24, 2016, 02:45:19 AM
anyone?
Title: Re: Get instance gameobject name and store in array
Post by: jeanfabre on November 25, 2016, 01:20:19 AM
Hi,

 I feel you are trying to reinvent the wheel and that indeed there must be a better way to achieve what you want to do.

 could you explain why you want this array of all gameObject? where Unity already give you that with the scene Hierarchy?

If you explain your use case, I'll be able to hopefully propose something better.

Bye,

 Jean