If I have a pointer to some base class like AActor
AActor * SomeActor = MyGamePawn;
SomeActor->StaticClass() returns AActor class reference instead of MyGamePawn because StaticClass is actually a static method.
There seems to be no way to retreive the actual class of the object.
I even tried adding to ObjectBase.h under DECLARE_CLASS but that resulted in a linker error saying unable to fine GetPrivateStaticClass
/** Returns a UClass object representing the super class of the object at run time even if you have a pointer to a base class */ \
virtual UClass * DynamicClass() \
{ \
return StaticClass(); \
} \