playMaker

Author Topic: find inactive gameObject  (Read 4060 times)

dennisli168

  • Playmaker Newbie
  • *
  • Posts: 8
find inactive gameObject
« on: June 09, 2012, 10:56:28 AM »
I'm setting up a preloaded pool of gameObejcts using playmaker.

Is there another way to get inactive gameObjects besides using getRandomChild?

So far that is the only action that worked for me, none of the other get child or find object actions works on inactive gameObejcts. This one works but it is not very efficient, since you can't define the name of the gameObject.

Also, getRandomChild gets gameObjects that are already detached from their original parents. Is this a bug? I would think that since a gameObject is detached from its parent, logically it would no longer be one of its child.
Thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: find inactive gameObject
« Reply #1 on: June 09, 2012, 02:42:15 PM »
Hi,

 to access inactive gameObjects, you need to store there reference prior deactivating them, else you can't get to them.

 For this you can use arrayMayker, and store in an array all your gameObject you are going to deactivate so that you can get back to them.

https://hutonggames.fogbugz.com/default.asp?W715


As far as randomchild getting non child gameObject, that's odd indeed.


bye,

Jean