UCLASS(Blueprintable) required to extend to Blueprints?

According to the docs, in order to extend a class in Blueprints you need to have UCLASS(Blueprintable), and they say that by default UCLASS() will use NotBlueprintable.

However, I can create BPs from classes that only have UCLASS. So is this a bug in the docs (maybe the default is Blueprintable now?) or am I missing something?

I’ve been wondering about this too. A related point that also doesn’t seem to match with the docs, is that with UINTERFACE, it appears to be necessary to specify (Blueprintable) in order merely to be able to cast to and call methods on the interface from within a blueprint.

The class you create inherits the properties of the parent class. Say for example you have class MyClassA that is declared like so :

UCLASS(Blueprintable)
class [PROJECTNAME]_API MyClassA : public AActor
{
GENERATED_BODY()
...
}

And now you create a new class, named MyClassB :

UCLASS()
    class [PROJECTNAME]_API MyClassB : public MyClassA
    {
    GENERATED_BODY()
    ...
    }

Your class MyClassB will still be Blueprintable. If you do not want MyClassB to be Blueprintable, you need to use the NotBlueprintable specifier.

It is clearly documented here also :

https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Reference/Classes/Specifiers/Blueprintable/index.html

I hope this can clear out any confusion :slight_smile:

Mick

4 Likes

You can mark the answer as Accepted if that helped you out! :slight_smile:

Cool, thanks for the explanation. Didn’t find that reference about that it would inherit from parent, good to know.

My bad, thought I had clicked it! Thanks ;-]