Having problems with my inventory system. Inventory doesn't save item information.

Hello,
i’m having a problem with my inventory system. Basically im trying to safe a reference of a item in the world in my inventory array and destroy the actor afterwards. Here are some screenshots of the most important parts:

In Character Blueprint:
Line Trace:

I use this to find Items:

If i find an item i add it to my inventory:
Event Interact.PNG

In an Actor Component (BP_AC_Inventory):
Add Item to Iventory (without destroying the actor afterwards):

Testing the inventory (everything works fine):

Here comes the problem! As soon as i try to destroy the actor after i collected it the inventory doesn’t safe the information contained in the actor.
Add Item to Inventory (with destroying the actor afterwards):

Testing the inventory (print inventory doesn’t show the items id and name):

Can you help me to fix my issue? I want to safe the actor in my inventory and remove it from the world afterwards.

The moment you destroy the actor, you invalidate the reference you’re keeping in the inventory.

Try storing all the actor data in inventory instead of the reference.

Okay i fixed it by storing the class instead of the reference in the inventory. It doesn’t matter since i intend to use only the class defaults anyway. Here’s a picture. Picking up (destroying the actor) and dropping works now. Thank you!