What does GET_MEMBER_NAME_CHECKED do

what does GET_MEMBER_NAME_CHECKED do?

Hello devilhiyan,

From searching the source code for where it was defined, here’s its definition inside of AssertionMacros.h

// Returns FName(TEXT("MemberName")), while statically verifying that the member exists in ClassName
#define GET_MEMBER_NAME_CHECKED(ClassName, MemberName) \
	((void)sizeof(UE4Asserts_Private::GetMemberNameCheckedJunk(((ClassName*)0)->MemberName)), FName(TEXT(#MemberName)))

It appears that you give it the name of a class as well as the name of a member. It’ll then check to see if the member you passed in is part of the class whose name you provided and then return MemberName if so. You can find examples of it being used all over the source code. If you need some examples, do a “Find All” for the macro itself.