# Data Assets and an Inventory System

**URL:** <https://forums.unrealengine.com/t/data-assets-and-an-inventory-system/1422623>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [November 26, 2023, 12:33pm UTC](https://forums.unrealengine.com/t/data-assets-and-an-inventory-system/1422623 "2023-11-26T12:33:50Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [November 26, 2023, 3:48pm UTC](https://forums.unrealengine.com/t/data-assets-and-an-inventory-system/1422623/7 "2023-11-26T15:48:19Z")

</div>

You are not setting the item by reference.  
The datatable will also reset upon the end of gameplay. It does not have a built in load / save function. You would have to use the datatable function convert struct to JSON string and save it as a field in your savegame.

Though loading would probably need c++

> [@Is there a way to update and save data table from blueprint?](https://forums.unrealengine.com/t/is-there-a-way-to-update-and-save-data-table-from-blueprint/104390/13):
>
> the engine now seems to support load/save to csv/json this is available on 5.1 at least but not sure if it’s on previous too. also You can save your data table from cpp. call FDataTableEditorUtils::BroadcastPreChange(DataTable, FDataTableEditorUtils::EDataTableChangeInfo::RowList); you can get the rows using DataTable-\>GetAllRows and you get some pointers. you can modify them. or you can add rows using DataTable-\>AddRow at the end you need to call DataTable-\>Modify() then UEditorLoadi…

Though I doubt there is need for a datatable for the characters inventory. You can just save out the TArray of structs to a save file and reload it on game load de-serializing it and populating the array again.

---

_[View the full topic](https://forums.unrealengine.com/t/data-assets-and-an-inventory-system/1422623)._
