Is TSubclassOf<> possible with interfaces?

Found a solution to this.

UPROPERTY(EditAnywhere, BlueprintReadOnly, meta = (MustImplement = "MyInterfaceName") )
TSubclassOf&lt;AActor&gt; MyInterfaceClass;

Just to be clear, “MyInterfaceName” is the exposed or “blueprint” name, not the C++ name. So if in c++ you define UFoo and IFoo as the interface classes then MustImplement = “Foo”.

Took me awhile to figure that one out.

8 Likes