Question by
Reddoge · Mar 30, 2020 at 08:24 AM ·
spritelisteditorwindoworderpropertyfield
Why is my EditorGUILayout PropertyField populating these sprites out of order?
I am writing an EditorWindow Script and when I populate an empty list with values they are sometimes out of order as the picture shown below. When I debug, the list populates like that. There is no code on my side that would be doing this. Anyone have clue? If it helps, I have the list of these sprites [HideInInspector] public. When I remove the HideInInspector Attribute it fixes the issue. Don't understand why. Running Unity 2018.4.16f1.
screenshot-1.png
(31.9 kB)
Comment
Answer by Reddoge · Mar 31, 2020 at 11:20 PM
I talked to a few other developers and found out that I had assumed that Selection.objects which is what Unity is using underneath was going to be in order from which it was selected. That is not the case.