Using TSoftClassPtr from a DataTable to spawn actor


I’m trying to use a DataTbale where one of the fields is a blueprint subclass of AMyActor.
In the Table Row struct (subclass of FTableRowBase) I’ve added a field

TSoftClassPtr<AMyActor> MyClass;

In the csv file I’m using a reference to the blueprint (right-click → Copy reference) and it seems importing normally – in the table overview I see this field is filled.

In my code, I’m trying to use this MyClass field to spawn actor:


but constantly getting the warning:

SpawnActor failed because no class was specified

At the same time

MyClass.IsValid() == false
MyClass.IsNull() == false
MyClass.IsPending() == false

Tried to call MyClass.LoadAsynchronous() but it have no effect.

Am I doing something wrong? How can I spawn actor from a class defined via a data table?

Wow thanks! That’s… hmm… obvious xD BTW I think it should be the answer, no? (I mean, not a comment)

your reference string to object Class should looks something like this “Blueprint’/Game/Blueprints/Test/TestBP.TestBP_C’” when " Copy reference" gives you something like this “Blueprint’/Game/Blueprints/Test/TestBP.TestBP’”. The difference is the “_C” postfix.