[C++] How to get UClass from TSubClassOf<>?

Here is simple question. How to get UClass from TSubClassOf<>?
For example I have

TSubClassOf<ACharacter> TalkActor;

But next code doesn’t works:

TalkActor->GetClass()

It’s returning not the right class, which I selected in editor.

Figured by myself.
I can just dereference it back with

 (*TalkActor)

Please use this instead:

TSubClassOf<ACharacter> talk_actor_subclass;

talk_actor_subclass.Get(); //returns UClass*
1 Like