Download

How to add memebers to array using UArrayProperty?

Hi, how to add members to array using reflection, in situations like this:


 void ArrayUtils::Add(UObject* arrayOwner, FName arrayName, UObject* newElement)
 {
     UProperty* prop = arrayOwner->GetClass()->FindPropertyByName(arrayName);
     const UArrayProperty* ArrayProp = Cast<const UArrayProperty>(prop);
     ... // ?
 }

I listed all UArrayProperty methods and found execDynArrayAdd, but I found no examples how to use it.
I would be grateful for any tips.