Download

Blueprint TArray of Static Classes not showing up in C++ runtime

I have a spell system that uses blueprints for setting things like the icon, description, etc. The functionality is in C++ though.

I am trying to add the static classes of these blueprints to my character pawn class, and then later spawn the actors from them. It appears as if everything is valid.


UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spells")
	TArray< TSubclassOf<ARPGSpellBase>> SpellClasses;


The problem is when I loop over the TArray, it’s always empty. Is there a UPROPERTY flag to pass the reference I am missing? You can’t use a TArray* in BP.

I have tried a dozen things and have followed a lot of posts. Even TArray<FString> comes back empty.

Basically all I want to do is two things:

  1. In character blueprint editor, I want to be able to add spells (which are blueprints inheriting from C++ abstract class) to an array
  2. In C++, I want to either directly have access to the actors, or be able to spawn them, from blueprint classes