I understand that TSubClassOf is safer to use than UClass*. But are these both essentially the same?
Well… if one is safer than the other one then they cannot be the same, right? There has to be a difference somewhere.
TSubClassOf
objects are checked at compile time where UClass*
is being checked at runtime.
There is a pretty good answer about this here: https://answers.unrealengine.com/questions/462096/why-use-tsubclassof-and-not-just-the-class-itself.html
I recommend checking it out.