I’ve been wanting to use KismetArrayLibrary’s GenericArray_Set function mostly because I don’t want to manually resize arrays (i.e. SizeToFit = true). One of the passed params is const UArrayProperty* ArrayProp. I understand this has something to do with Unreal’s property (reflection) system, but there appears to be no documentation anywhere on how to get any given array’s property.
As a simple example:
TArray<FVector> LocalVertices;
FVector MeshLocation = VisualisationMesh->GetComponentLocation();
for (int32 i = FirstIndex; FirstIndex < LastIndex; ++i)
{
FVector Current = Points*; //Points is a parameter passed from elsewhere.
UArrayProperty* ArrayProp = ?? // What goes here?
UKismetArrayLibrary::GenericArray_Set(LocalVertices, ArrayProp, i - FirstIndex + 1, FVector(Current.X - MeshLocation.X, Current.Y - MeshLocation.Y, Current.Z - MeshLocation.Z), true);
}
What do I replace “??” with?