Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: sofianehamza on April 29, 2019, 09:03:02 PM

Title: Sort an Array of Game objects by name
Post by: sofianehamza on April 29, 2019, 09:03:02 PM
hello, I've been trying to use the sort array action with game objects it does not seem to work
is there a way to sort game objects alphabetically then reverse it
thanks in advance
Title: Re: Sort an Array of Game objects by name
Post by: jeanfabre on May 21, 2019, 02:28:34 AM
Hi,

 Are you using ArryMaker or the built in FsmArray?

I would use ArrayMaker anyway, and keep a hashtable with keys as names and values as gameobjects, then you can extract the keys, sort them the way you want, and when you want to access them in order, you use the sorted array, and then pick up the gameobject from the hashtable.

without hashtables, it's not possible, only via a custom actions.

Bye,

 Jean