How to get value of some USTRUCT, while only having access to its UScriptStruct and memory adress?

Hmm, I see what you are doing, but it is a bit odd.

The only reason I could think of, that you would be doing this sort of thing, is if StructType was a derived struct type that you don’t know at compile time, and returning it as a base type which you do know. But you are doing check(StructType == T::StaticStruct()) which nullifies that statement. You DO know the struct type at compile time.

Maybe you have good reason to do so which eludes me, you don’t have to answer this question, but is there any reason you’re not simply doing this ?

template<class T>
T GetDecodedValue() const
{
    T StructValue;
    SetStructFromBinary(StructType, &StructValue, *this);
    return StructValue;
}