Best way to store item info

So i was following Ryan Laley on his inventory system. And my question is about item info.
In his tutorial he makes struct about item makes item BP and sets all info like image name etc. So i did that too but when i added new variable to that struct all items that i set went blank.
Is there a better way to set these items so info doesn’t get lost every time i update struct?

I was thinking about construct and set info there but than if i need class defaults and get that struct it will be empty.

That’d be a bug. You may need to explain in more detail what you do / expect.

An actor’s struct (left) does not lose its data when I modify that struct (on the right) in 4.27:

To clarify:

  • if an actor modifies its own data, updating struct defaults will have no effect
  • if an actor’s data is default, updating struct will affect the actor’s data

I can demo the above if necessary as it came out sounding convoluted. Can be phrased better.


Perhaps your case is different or more elaborate:

all items that i set went blank

What are those items?

2 Likes

Yes that works ur example. I have 30 items some items are like copper ore that only holds info about that struct only. And i have weapons that have functions in them they are the ones that get reset after i add new variable to struct.

Example I add all info than i go and add variable to struct. save all Close UE open and all is gone.

Except item that i dont open in full BP editor.