playMaker

Author Topic: Get instance gameobject name and store in array  (Read 2274 times)

superdoompanda

  • Playmaker Newbie
  • *
  • Posts: 2
Get instance gameobject name and store in array
« 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

superdoompanda

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Get instance gameobject name and store in array
« Reply #1 on: November 24, 2016, 02:45:19 AM »
anyone?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get instance gameobject name and store in array
« Reply #2 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