Hey, I was toying around with the UStruct to and to UStruct converters, and I need to admit they’re pretty useful, but I have a question. In most usage cases, data from servers has other naming conventions. Imagine this:
Data from server:
Now, in Unreal, I want to map it to a struct where the variables are named like this
FString TestString;
int TestNumber;
bool TestBool;
But the converters always try to translate it 1:1. My question now, is there a way to specify how the converters should map them? If not, it would be great to have a UPROPERTY specifier for it, like:
I don’t see any specifier checks, and if they would be it most likely would be meta specifier as only those don’t require UHT modification. You can read meta specifiers pretty easily via UField functions (since meta subspecies can be in UClass and UFunction)
This is not documented you would need to figure out looking via API refrence, but i quickly find example how to get UProperty of variable
Hey, thank you! I had a look and in line 182 the variable name is defined as FString VariableName = StandardizeCase(Property->GetName());. So it get’s just the variable name of that property and uses the StandardizeCase function which just puts the first char in lower case and replaces “ID” with “Id”, so that is probably where I’d need to add something. Maybe I’ll do a pull request for changing those mappings, it would be much easier to have that.