when I try to get the property value the editor crashes with access violation, names of the properties themselves are read correctly
FText ULibFunctions::GetTextField(UObject* obj, FString name)
{
for (TFieldIterator<UTextProperty> Prop(obj->GetClass()); Prop; ++Prop) {
if (Prop->GetNameCPP() == name) {
FText val = Prop->GetPropertyValue(obj);
return val;
}
}
return FText();
}