Announcement

Collapse
No announcement yet.

How to add memebers to array using UArrayProperty?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to add memebers to array using UArrayProperty?

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

    Code:
     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.
Working...
X