I’m interested in this because I’ve been looking for something similar, but after reading what you posted I wonder…
From what (little) I’ve gathered about CustomThunk functions, that part before [FONT=courier new]P_FINISH is meant to be used to identify the pin type, so couldn’t you do something like… [FONT=courier new]P_GET_TMAP_REF(FProperty,FProperty,ParamName) (since all pins are “properties”), and later identify the types? Not sure if that would actually work.
Er, isn’t “returning a value by ref” kind of incongruous here? I’m talking from my knowledge of C++ limited to mainly UE4 itself, so maybe what I say it’s possible in plain C++ but the reflection system doesn’t support it. Otherwise I suppose you’d simply need to make the return type of the function itself by ref, something like this:
UFUNCTION(BlueprintCallable, CustomThunk, meta = (MapParam = "TargetMap", MapKeyParam = "Key")
int32& Map_FindRef(const TMap<int32, int32>& TargetMap, const int32& Key);