When using the AddDynamic macro of a dynamic delegate, line breaks can cause the function name to be incorrectly parsed.
[FONT=courier new]delegate->AddDynamic(this, &UMyClass::MyFunction)
[FONT=courier new]delegate->AddDynamic(this, &UMyClass::
In the second case, the AddDynamic macro expansion retains the space between the :: and MyFunction, i.e. the macro sees the function as “&UMyClass:: MyFunction”. Eventually this is passed to GetTrimmedMemberFunctionName, which retains everything after the :: as the function name, including the extra space, i.e. " MyFunction" in this case.
The easiest fix would be to trim leading spaces in the function name when removing the “<Class>::” prefix.