Alpha-Numberical sorting standard

Summary

Please fix the alpha-numerical sorting to follow common standards. 9 should not be higher than 10 and so on. 9 should be higher than 1.0 or 1_0 or 1-0.

While we are at it, please also add automatic increments in names. Duplicating entities in prefabs makes them have same names which needs manual renaming. There is also no group renaming option for entities, but that would not work anyways without an automated suffix fix since duplicating entities makes them appear in random order in the hierarchy.
All that makes creating prefabs in a prefab driven approach using dulicates often very tedious and manual.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

UI/Tools

Steps to Reproduce

Numbering entities in a prefab

Expected Result

0
1
2
…
8
9
10
11
11_1
11_1_0
11_10_2

Observed Result

See image
0
10
11
1
2
…
8
9

Platform(s)

PC

Upload an image

Funnily enough, when assigning entity references on components, the sorting seems to follow better algoriths as the desired sorting for 9 and 10 is given in the dropdown:

while we are here, could you please make the dropdown view be collapsed by default or add collapse functionality to it because you have to scroll so far every thime you assign an array of entity references.

That’s alphabetical sorting since the item names are strings, not just numbers and they must support many more characters than just digits.

The sorting is done char-by-char, left-to-right, considering the unicode number of the char (Check HTML Unicode Basic Latin or https://www.charset.org/utf-8)

This is completely fine, normal and used on lots of other places. Other examples where this is used is on Windows Explorer for files and folders, and many other listings that needs to support full strings instead of just digits.

If you want, you can click the collumn title to change the sort order/rule, or sort by another data (such as internal id, type, creation order and so on). This may be why on one of your later examples it “appears” to be correct, it may be sorted by creation date or some other rule.

I personally always choose to sort by Internal ID, specially on Scene Graph stuff. Since the entities are initialized at the internal id order (iirc it also matches creation/instancing date).
This way you can be safe, know the explicit initialization order of the entities/components (top to bottom), and avoid bugs due to user-error when developing code in an unexpected order.

1 Like

Could you explain a bit more where you find your sorting options? When i click on the title it just inverts the sorting. I cant find any more options to sort by? What naming convention do you use to sort them properly?

I am also not sure how it is different on windows? In the file explorer i am able to use my naming convention and it sorts them perfectly fine?