Safely find a reflected property name?
I need to access a UPROPERTY of a UCLASS through reflection in C++. It shouldn't present any challenge in itself, something along the lines of:
However I'm absolutely certain that there's a preprocessor macro that provides safe way to reference a property name in C++, that will throw a compile time error in the event that the name changes. Something like this:
Can anyone remember what this macro's called? It's a bit tricky to find-in-all-files within the source code as I just can't remember any part of its name! (Tried searching for safe property, things like that - also tried googling for half an hour). Gone through UClass.h to no avail.
asked Feb 02 '19 at 06:16 PM in C++ Programming
Ah found it... GET_MEMBER_NAME_STRING_CHECKED.
For anyone else reading this in the future, there's also GET_FUNCTION_NAME_CHECKED.
answered Feb 02 '19 at 06:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here