Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Captaincrud on November 12, 2016, 11:33:42 PM

Title: Find game object in array by name?
Post by: Captaincrud on November 12, 2016, 11:33:42 PM
Am I missing something seems like there should be a way to do this? I could go long route make a switch that gets index number but seems like a lot of extra work for nothing.
Title: Re: Find game object in array by name?
Post by: djaydino on November 13, 2016, 01:00:45 PM
Hi,
I checked on the unity forum, you could use hashtable instead.
you can get arraymaker on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
it has hashtables.
or have 2 array one with strings containing the gameobject names and one with the objects.
and do the search in the array with strings to get the index nr
Title: Re: Find game object in array by name?
Post by: dudebxl on November 13, 2016, 01:50:57 PM
try ArrayListIndexOfByString action from ecosystem
Title: Re: Find game object in array by name?
Post by: djaydino on November 13, 2016, 03:03:11 PM
try ArrayListIndexOfByString action from ecosystem
that might work but you need to use the "array maker" package
Title: Re: Find game object in array by name?
Post by: Captaincrud on November 13, 2016, 04:58:08 PM
bummer ill just do a switch sets index number really inefficient way to go about it oh well.
Title: Re: Find game object in array by name?
Post by: jeanfabre on November 14, 2016, 01:25:57 AM
Hi,

 Did the suggestions above did not helped you?

Bye,

 Jean