I was watching some tutorials on creating an inventory system, and most use Data Tables. I am finding many of my Assets are huge in file size because of this. Am I doing something wrong?
I am finding that because I am using the “Get Data Table Row” in certain Assets, all referenced files now have huge Size Maps. This is because in an inventory system, you need access to the items Class. The issue is, if its an inventory system for a decent graphic quality game, each item blueprint/class will have large individual file sizes due to materials and textures being used. This means the data table that referencing all this information will take in the file sizes from all of these items. The issue then becomes, once you use Get Data Table Row, if the data table itself has file size of 350mb, everytime you use the Get Data Table Row in an item (which needs to be done in every item based on the tutorial, as well as in a WidgetUI, to gather the name of an item), means every item will have a file size of 350mb.
Which circles back to the question, am finding an item incorrectly by using Get Data Table Row? or am I perhaps missing something else?
I am thinking a Data Asset would be more efficient then a Table. Do you by chance know how to input the path to find the Data Asset? I tried a few different ways but couldnt get it to work.
Try GetAssetsByPath, i think you have to register them in project settings otherwise.
Or depending on what your testing just create a variable of PDA_Base and send through DA_Manny. yes its a hard ref again but this time its only manny and not a whole data table of 1000s
EDIT To #1: disregard 1, I wasnt requesting the information from the player blueprint was the issue.
Regarding Data Assets, I’m still stuck on having results show up when doing a print string. I don’t know what to put in for the package path to get anything to show. Based on my images above, do you know what the path url would be by chance?
While creating the variable PDA_Base is one way of doing it, I feel like it would take more space then just doing a soft reference in a stuct/dataTable method. Because you are adding DA_Manny directly to a character blueprint or item blueprint. So if I created BP_Character, it would have its own file size from whatever code I implement, then DA_Manny’s file size on top of that. And of course DA_Manny will have its file size added to the total package size (if my wording made sense).
if you’re using path not class it’d be
/Game/DATest
thats not how DataAssets work, see with a datatable you have to load the whole table, with data assets the ref is only the baseclass which is empty. then if you pass a variable it does load that but only that. of course you can take it a step further an use soft references inside your DataAsset and then that will be small too.
dont get too obsessed with file size, yes 1000 assets in a datatable is bad but if you’re passing 1 ref its because you intend to use it and if you intend to use it, it needs to be loaded anyway