Import Actor Reference from CSV to Data Table?

I have been reading the documentation on [Data Driven Gameplay Elements][1], but I’m having problems trying to import an Actor Class reference.

30401-structure.png

I am trying to store a reference to a Blueprint (of Actor type) that can be instantiated in the game.

In my Data Structure Definition, I’m trying to use a type of “Actor” for my field, and in the CSV file I have tried all the following, but none of them have worked:

  • “”“Actor’/Game/Blueprints/MyActor.MyActor’”“”
  • “Actor’/Game/Blueprints/MyActor.MyActor’”
  • Actor’/Game/Blueprints/MyActor.MyActor
  • “”“Blueprint’/Game/Blueprints/MyActor.MyActor’”“”
  • “Blueprint’/Game/Blueprints/MyActor.MyActor’”
  • Blueprint’/Game/Blueprints/MyActor.MyActor’

I have also just tried using the value shown in the example… but even that doesn’t work – the field always ends up blank (even when setting the field type in the Data Structure Definition as “Texture2D”

  • “Texture2d’/Game/UI/HUD/Actions/Barrel’”

Can anyone provide the (a) field type for the Data Structure Definition and (b) exact prefix to be used in the CSV file field to successfully import an Actor Blueprint reference?

Here is my CSV:

Name,CardID,CardName,ManaCost,CastingSeconds,CooldownSeconds,SpawnAsset

1,101,My Test Actor,5,0,1,“”“Actor’/Game/Blueprints/MyActor.MyActor’”“”

My Data Table can be seen at the top of this post.

if you want something that can be instantiated, you should use Class.

Could you elaborate a little more? When you say “you Should use Class”, do you mean I should use (literally) the text “Class” as the path prefix in my CSV file, or do you mean I should use the class of the object. If the latter, then what type should I use to define the field in the structure (because the class will be different for each row).

both.

you can copy path references from the editor like this:

just create a variable of type Class, set its default value to your custom class, then right click and copy its path.

when you export it into a .CSV file, it will automatically wrap it in double quotes, so just paste it into the spreadsheet like this:

Class’/Script/Engine.AmbientSound’

I’m probably really missing something obvious here… but I don’t believe there is a way to specify “Class” as a type in a Data Table definition.

30534-no_class_class.png

use class Actor, like you were before. or you could use a base class that all your objects inherit from, like weapon or pawn. as long as its purple, and some kind of actor, it can be spawned from.

BRILLIANT!!! That worked perfectly :slight_smile:

Here’s the reference it generated under 4.6.1 for Blueprints – I’m glad you pointed out a technique to get a reference because I wouldn’t have guessed this exact syntax in a million years :slight_smile:

“Entry2”,“BlueprintGeneratedClass’/Game/Blueprints/ThornDart.ThornDart_C’”,12

Thank you for these posts, greatly helped me out.

Thank you, friend! I was wracking my brain, following all the other steps out there, until you pointed out one crucial part: append “_C” to your object pathname.

When I added the “_C” to the “BlueprintGeneratedClass’/Game/whatever/ObjectName.ObjectName”, it got the structure to change from showing “None” to its correct pathname. I had originally just right-clicked on an asset, clicked “Copy Reference”, then pasted that into the .csv, but that didn’t give the correct pathname that the structure was looking for.

Thank you again!

Met this problem as well.
I was trying to add minor DataTable references in a main DataTable.
Just do as the official tutorial won’t work.
Like put the following in CSV file, it doesn’t work.

“”“UDataTable’/Game/Data/Music/still_waiting.still_waiting’”""

(Sure I need to add corresponding FTableRowBase struct like:TAssetPtr blablabla;
)

And I tried /Game/Data/Music/still_waiting.still_waiting directly and it works.
Using UE4.10.1