Hello, sorry if the question seems obvious, but I couldn’t find it anywhere.
If I define a class either without inheritance, or inherited from one of the many classes which don’t appear in the “New c++ class” creation inside Unreal,
how can I access if from inside the engine? it’s detecting it for sure because it compiles it.
I’m guessing you mean you want to access it within the Blueprint Editor. See the page on Class Declaration, and below are some specific tips:
- You should be inheriting, from
UObjectif nothing else, and use theUCLASS([specifier, specifier, ...])macro on the line above your class declaration. - If you want to declare variables in Blueprint to hold your object, use the
BlueprintTypespecifier. - If you want to subclass your class in Blueprint, use the
Blueprintablespecifier. - Make sure to use
UPROPERTYspecifiers on your object’s fields andUFUNCTIONspecifiers on any methods that you want to call from Blueprint.
Thank you very much!
You should be able to UCLASS() every kind of class (U, A, T, F) right?
It can be used on any type of class. The name prefix makes no difference.