# Best way to save actor object data in real time?

**URL:** <https://forums.unrealengine.com/t/best-way-to-save-actor-object-data-in-real-time/1913714>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [June 23, 2024, 2:24pm UTC](https://forums.unrealengine.com/t/best-way-to-save-actor-object-data-in-real-time/1913714 "2024-06-23T14:24:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OMGSam310](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OMGSam310](https://forums.unrealengine.com/u/OMGSam310)\
**Post date:** [June 23, 2024, 2:24pm UTC](https://forums.unrealengine.com/t/best-way-to-save-actor-object-data-in-real-time/1913714/1 "2024-06-23T14:24:25Z")

</div>

Hello, I am still quite new when it comes to game development and I am trying to build inventory system and so I have following structure for pickup items.

Classes:  
\_Item (Parent)

- Food(Child)
- Ammo(Child)
- Weapon(Child)
- Water(Child)

I am following a tetris system design and following is my structure for Widget UI of Inventory:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/e/e2e4b43391789eaa082bc95fa62bd50e587ff9a7.png)

My Struct for - for example - Ammo looks as follows:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/5/1b5f3a43258a1fd02ee8f6f268c32f6a9eefaa6d.png)

I then place the ammo item, and set what type of ammo it is, etc.:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/5/7658065b79e1a1de3c9a40d0a2f90ebc04673685.png)

Setting item in World:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/1/e41b224d2ac2448cd405d574611f66ef6814d7dd.jpeg)

My problem is I want to store these details with Item Structure itself. As you see I set up alot of things when Item is spawned in the world:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/c/5bc302b988ef86daeba061eeaef0a6c6cab774c7.png)

but when I pick up the item, I destroy it, resulting in my O\_Item becoming “unknown Class”. and it gives me error that I am trying to access Ammo Class which is pending to be killed. I am trying to find a solution for this but having a difficult time.

I basically need to get UUID from the class to compare it for tetris inventory system and check if they are same kind of items or not, if not, then store them separately:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/5/53515be3b31a463d507a544e6d99d07a0624624f.jpeg)

Problem is, I cant save it in the AC\_Inventory array because its actor object of ammo is destroyed once I store the data in the array:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/9/f69e77ca07ef4ca66d93f32e285f922876c4617c.png)

If anyone can help, please let me know. Thanks! I am still trying to find some solution as to how I can save it. Maybe I can save it as a class reference and not an object reference? WIll that work? I dont believe it would but I might give it a shot if it doesnt. Anyways, It would be great if you guys can let me know how do it and also, I also need to use the class later to recreate the item if I drop it.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 23, 2024, 4:31pm UTC](https://forums.unrealengine.com/t/best-way-to-save-actor-object-data-in-real-time/1913714/2 "2024-06-23T16:31:57Z")

</div>

> [@OMGSam310](#):
>
> I want to store these details with Item Structure itself

Have a struct or array of structs in a Save Game object and save that:

> **[Saving and Loading Your Game in Unreal Engine | Unreal Engine 5.4...](https://dev.epicgames.com/documentation/en-us/unreal-engine/saving-and-loading-your-game-in-unreal-engine)**
>
> Overview of how to save and load your game

Don’t think of it as of a Save Game in a traditional sense, just some saved data. It’s the most common practice to pack a bunch of data into a struct and save that.

---

<div class="post-metadata">

**Author:** ![ShadowBr0kerz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shadowbr0kerz/32/1201558_2.png) [@ShadowBr0kerz](https://forums.unrealengine.com/u/ShadowBr0kerz)\
**Post date:** [September 9, 2026, 12:21pm UTC](https://forums.unrealengine.com/t/best-way-to-save-actor-object-data-in-real-time/1913714/3 "2026-09-09T12:21:15Z")

</div>

structs on a savegame object is the standard path yeah. for realtime just keep a working copy in gameinstance and flush to slot on pickup/drop (or a short timer), async save so it doesnt hitch. on load read the struct array and rebuild the grid from item IDs. save-on-change is plenty, no need to overthink realtime.

if you want it prebuilt, Advanced Save System, a save/load system plugin for Unreal Engine 5, does async slot saves + serialization you can call straight from BP: [Advanced Save System](https://www.fab.com/listings/1268f6a9-7ba8-4f30-91b8-73618d593252). on sale atm ($23.93).
