Is it possible to generate a TSubclass<> from a UClass pointer?

Hey :slight_smile:

I am quite new to Unreal but am familiar with Unity. So maybe some features will confuse me a little bit, so bare with me :slight_smile:

So basically I wanted to dynamically spawn different classes that derive from a common base class. To keep things snappy, Iโ€™m using the UClass pointer to pass class information.

Now, the trouble is, I can only seem to spawn objects using TSubclass<>. While this approach works, I wanted to ask if there is a work around (just curious) were I can cast the UClass into a TSubclass<>.

Thanks for reading :slight_smile:

PS: Correct every mistake I am doing !

You can spawn actors using UClass*, whatโ€™s wrong?