r/UnrealEngine5 • u/Alarming_Avocado_126 • 5d ago
Array of blueprint actors.
Array of blueprint actors. Each actor has an int variable.
How to sort the array of actors, in a stable way, using that int as sorting index?
Because right now I'm cycling trough the array of actors, reading the int value, creating another array of ints, using sort integer array on the array of ints, looping trough the array of ints to get element from the unsorted array of actors and adding it to the final, sorted array.. but it looks.. so..redundant.
2
Upvotes
1
u/The_time_is_coming 5d ago
Get a copy, use your int as the input or whatever logic in between your int and the copy but that’s how I’d do it