Hi, so I have a data table with info I use to represent each item in the game, in a UI (like name, icon etc.).
Can I use data assets for that purpose instead? Is it better?
Can you iterate through all your data assets, like you do with data table, to find a certain one?
Thanks.
I normally use data assets when I know there are few elements, and that there are usually only a few of them on the maps. You select them specifically and don’t have to interact with all of them.
If you’re going to create data assets and then create an array of them all, I don’t see the point.
And data tables to store many items, and if you have to interact with many. Also, now with chatgpt, which can fill in or review the tables, is another plus.
you can use BulkEditViaPropertyMatrix
you can use the AssetRegistry for this
in my opinion, yes. structs are broken and datatables suck unless you need to import/export the data
Thanks. It seems like the forced way to do it, doesn’t it?
In my case, those data assets represent each of the items in the game. So it’s going to be a lot.
you can do it by filepath so it only looks up items, no worse than a massive data table, but if you handle it well you dont even have to load the asset so its much more performant
Does that improve over having datatables contain only soft pointers (not loading the asset)?
Structs are broken on the asset / blueprint side, and Core Redirectors don’t work for them. Datatables can die after a small struct change and won’t let you edit their binary files to update them.
However, I found them useful. Haven’t used the asset registry yet.
In the past I used to have pointers within datatables to refer to other datatables. This grouped things together nicely. For example, I could map entries like “apple, pear, banana” to another entry “fruit”. This way I could specify the effects of eating a fruit just once (“add health by X”) just once and reuse that. That pointer could be soft, loading into memory only when required.