I am converting BP to C++ and the variable in question is a Class Reference;
What is the C++ equivalent?
TSubclassOf Type* -> StaticClass() Type*
I know I am overthinking this.
I am converting BP to C++ and the variable in question is a Class Reference;
What is the C++ equivalent?
TSubclassOf Type* -> StaticClass() Type*
I know I am overthinking this.
Isthiswhat you’re looking for? So if for example, I wanted it for APawn, it would be APawn::StaticClass()
TSubclassOf<> is (as the name implies) for sub-classes. Typically you would use this to reference Blueprint assets, or pass classes around the codebase. It can be nicely exposed through reflection.
SomeType::StaticClass() is useful when you just want to reference the native class.