So I’m following Epic’s official inventory tutorial using UMG here:
I’ve followed it fairly well (I did make some adjustments though because my items are given to you, they aren’t picked up in the level like the tutorial). My issue comes in here:
My inventory array is stored in a Game Instance so it can be persistent across levels. When I go to a level other than the one that I received the item in however, even though the items will still be displayed in my inventory properly, the item’s use action doesn’t trigger anymore.
I’m assuming the reason for this is that when I spawn the item actor in that level, and then change levels, that actor no longer exists. But, it’s saving an actor reference in the inventory structure (which is in the game instance). I would have assumed this would be enough to keep it persistent though other levels, but apparently not.
Any ideas how I can fix this issue? Thanks!