InventorySlot resetting to default image in game mode?

I’m having an issue where the image used for the Inventory slot resets itself to the default source image in game mode.

The UI in the editor:

The UI upon hitting play:

Does this have to do with how the UI is getting redrawn? This image reset is not happening with any other UI elements.

Are you editing the instances within the Inventory in Edit Mode, or are you selecting the InventoryItemUI prefab. If you only modify the instances within the Inventory (these only exist in Edit mode as place holders), those instances are deleted when the game is run and new instances are put in place to represent the actual inventory items. If from within the Inventory, you highlight one of the Instances and select Open, you’ll be editing the actual instance, and you can change the background.

1 Like

Thank you Brian, that makes sense. I opened the inventoryslot prefab itself, and updated the image source and now it is working.

1 Like

Privacy & Terms