Unable to add ActorClasses in DataTable Editor 4.7 preview

Currently you can only add Class Actor inside of an struct, but inside of DataTable Editor you are unable to fill it with any content, it simply doesn’t show up.

Only workaround at moment would be to manually add each Actor Class in each Row at every launch of game during runtime.

bumping this

Hi ,
I didn’t use any .csv File, I tried creating it only with new Features in 4.7. I created a Structure where I created these new Variables like “Actor” class but when I then create a DataTable from that struct, I am not able to edit any Values inside of new RowEditor.

Struct:

27475-1.jpg

DataTable:

Hi Nobody,

Sorry for delay in response. Can you and attach .csv file you’re using to create your data table? Thanks!

Thanks for clarification, Nobody.

Since Actor variable is looking for an instance of Class, you can’t set a default value for it, neither in a Struct nor a Data Table made from that Struct. There is no way, however, to edit Data Table at runtime at this moment, so I have entered a bug report for developers to consider (UE-8001). I’ll let you know what they say when I see an update. Thanks for report!

Thanks for reply!
I would understand it with (in my example) BP, since it has to be a reference/instance, but shouldn’t BP2 (Actor Class) work, since its no actual instance and just points to a default Blueprint? So I would be able to spawn it via runtime from DataTable?

I’m not sure, but I’ve included notes to that effect in bug report. I’m not certain how quickly they’ll get to this one, so you may need to find an alternative to Data Tables for this at moment. I will let you know when I get any kind of response.

I was planning on using Data Tables to control my blueprint setup.
Game would pick a member of data table and then pass those values onto blueprint to construct character with.

What would you suggest as an alternative while some of these classes cannot be defined in data Table?

At moment, you’ll need to build another system for that kind of functionality. Easiest thing to do would probably to use arrays, and just pre-fill arrays with data you would put in a data table. Since arrays can be adjusted during gameplay, this should be a suitable workaround.

As a side note, there is an additional bug report for certain variable types that do not allow defaults in structs as well, such as Class as discussed above. I’ll update this post when I see an update on that as well.

I don’t usually “bump” threads, but I’d really like to see ability to edit class references in DataTable Editor as well. I’m seeing quite a few long-open issues on AnswerHub around new DataTable Editor that could be closed as Solved if we had this capability.

I mean, if we could even just have a text field for Actor class fields where we could enter class name (of if we had a function that would do equivalent of “Get Class By Name”) that would be a HUGE win.

This should be fixed by a general Struct overhaul that allows Structs to set defaults for multiple types that are currently missing. It’s a very new change and probably won’t make it into 4.8 (it hasn’t even been verified, yet), so you may not see it until 4.9.

Once I get confirmation that it’s fixed and verified, I will try to find GitHub commit(s) for it and post it here so you can implement it before 4.9 release. Thanks for your patience!

Fantastic! Can’t wait to try it out :slight_smile:

Is there a C++ implementation to this that anyones aware of? Would make my life a lot easier with my current setup.

I was reading this
"
Thing is, BPs are actually a bundle of data. You are not including an extension, you are accessing object inside of blueprint. BP consists (to my knowledge) of actual Blueprint logic (MyBP.MyBP) and generated C++ class for BP (MyBP.MyBP_C). If you want to automatically load up a class from a BP, you’d do it like this:

“UClass’/Game/Blueprints/Spells/BP_Fireball.BP_Fireball_C’”
In my struct I have

UPROPERTY(BlueprintReadOnly, Category = “Magic”)
TSubclassOf SpellClass;
This works like a charm for me. All my spells derive from a shared base class so I just cast Actor class I get to my own class and work with that.
"

Since all my items derive from a base actor class I should be able to create my crafting system similarily, by just creating struct in C++ to find specific classes for say craftable_rock and craftable_pully that all inherit from master_item and allow my BP designers to then use BP getRow functions to spawn those classes or remove them from an array or otherwise?

Hi ,

You should post that question in C++ section of AnswerHub. We’re just tracking this bug here, at this point. Feel free to grab link to this post when you do. Thanks!

As a workaround i define in my DataTable struct c++:

UClass* WeaponBluePrintSpawnClass; 

That allows me to define a Spawning class used for spawning after Casting it to an actor. It’s not that specific as AActor but it works for now, btw i’m using 4.9.2 atm.