It's a common practice in Unity to start the name of a scene, prefab, etc. with an underscore so it will be listed first in the project window.
This is because things are sorted lexicographically and underscores come before letters in ASCII, right?
Well, no.
So what the heck is Unity using to sort things? Did they ... did they really add the underscore as a special case?
@peterdrake Unity’s project browser uses a custom function called EditorUtility.NaturalCompare() which tries to do “human like” sorting. I’d tell you more but the implementation is on the native side
@thebeardphantom The documentation gives absolutely no hint as to this behavior, but points out another shocking decision.
https://docs.unity3d.com/ScriptReference/EditorUtility.NaturalCompare.html
Not sure how one would run across this documentation without knowing the name.
@peterdrake By shocking decision you mean how it mentions how numbers are sorted?
@thebeardphantom Yes. Lexicographic is a single, easy-to-understand rule. Stacking up a bunch of special cases (especially if undocumented) is a path to unpleasant surprises.
@thebeardphantom Well now I feel worse about OS file browsers.