I’ve got an array of this type of struct which holds a hundred or so questions. Is there a way to find the index of the array item by just the UniqueID string? If I use FIND or CONTAINS I need to supply a whole struct to test against rather than just the element i’m checking for.
I know I can do this with a loop and i’ve done it tons of times before, but there must be a more elegant way of doing it?
The more elegant methods are FindByPredicate(), ContainsByPredicate() and the likes of those, but as far as I know they aren’t exposed to BP, so you’d have to use C++ to take advantage of it.
Cool - i’m no stranger to painfully forcing a function out with a blueprint library - i’m pretty rubbish at c++ but I get there in the end. I’ll post my source here if I get it to work. Thanks - it’s often a case of just knowing the lingo - ‘predicate’ - to get started on something like this.