I made a FPS where a character has an inventory. The player starts with nothing in inventory. When the player hits a pickupble, it is added to inventory.
So, I made an interface IPickupble with a method “OnPickedUp” which will be implemented in class such as “Weapon”, “Powerups”, etc.
My inventory is a class with a array of Pickupble, and when a Pickupble is hitted, it is added to the array.
My character contain an object “Inventory” and I spawn it at the start of the level, so the character has an inventory from the start. Everything should go fine :
But I don’t know why, after 1 minute (I counted the time several time), my inventory is destroyed so my character doesn’t have an inventory anymore !!! And there is no reason it should do that.
Is someone can help me? I think it’s definitively a bug from UE4.
After 1 minute :