Download

Blueprint Sorting

I have created a way to sort arbitrary arrays in blueprints and stuffed it in a plugin.

Sorting an array with an event:

Sorting an array with a function:

It contains a Sort Array custom node that lets arrays of any type be sorted by an event or a function.

An example project using this plugin can be found here.

Check out the plugin repository for documentation.

This is currently an alpha version. It currently uses a very inefficient sort algorithm that is fine for small arrays but will be very slow on large arrays. I will replace the algorithm when I need it and am satisfied with the approach this plugin takes.

This plugin is free and available under the MIT open-source license. Do what you want with it.

This is great stuff, thanks!

Just what I was looking for. Thanks.

This plugin gives me Fatal error in packaged builds. I’m sorting array of player states, while comparing them by INT from a struct variable inside. Using 4.18 (had to change target file of plugin to compile)

Do you have this working with 4.20?

Did you make any other modifications to the plugin to get it to work with 4.18? For me the event node doesn’t show in the sort array node in blueprints