Adding Prefabs To a List in the "Same Order"

Hi guys,

This is my first post here and I hope I am doing right by posting my question in a new thread! Well, my question is as follows:-

Suppose we have a script “MyScript” with a "public List myShapes" attached to an "empty GameObject". We also have a set of shapes in form of prefabs in the prefab folder numbered 1, 2, 3, etc. Now, we want to add these prefabs to the List through the editor but in the same order.

I’ve noticed that if I select all the prefabs (after locking the inspector on the empty GameObject) and drag and drop it onto the List name (myShapes in this case), all prefabs get added but in a random order!

PS: @Adam-Buckner_1 - It definitely is your super helpful live training sessions that pulled me here!! :slight_smile:

Well, I suppose you could drag them one at a time into the list. Otherwise, you could have a criteria that could influence the sort order, add all of the items to the list and then sort the list…