How Does UClass store an Class

Hi! I have questions about UClass. I know Normally C++ does not allow us to store a Class using a veriable. Altought the that fact, we can store a class typing “Uclass* classname”

how it can possible I really wonder how it works. I can use this way when I spawn an actor but I’m currios about what’s going on the background. Is it class which contains member class, or something different?

It’s called reflection and it’s something that Epic has built on top of C++ as part of the engine. Whenever you compile, Unreal Header Tool parses all the UCLASS, USTRUCT, UWhatever macros and the associated C++ to build up the data that’s stored in the UClass.

2 Likes