Hi I want to find an Element in Array of Structs. I have no idea whats wrong because it works fine for FVectors for example
This is my structure
And tis is my Find method
If you have any ideas please share with me
Thanks!!!
Hi I want to find an Element in Array of Structs. I have no idea whats wrong because it works fine for FVectors for example
This is my structure
And tis is my Find method
If you have any ideas please share with me
Thanks!!!
You need to overload == operator on structure, that will define when structures is equal, so find function will know what to look for
Hi loxless, you can use the TArray::FindByPredicate
or TArray::FindIndexOfByPredicate
functions which are explained in the docs here.