Issues with Item Popup When Reentering the Game


Author: Ethan Ortega

Problem: While refining our teddy bear puzzle to include saving for when it is completed, I noticed when you exited the editor and loaded back in without claiming the teddy bear when you tried to claim it afterward the UI popup would not display. At first, I had believed this to be a problem with the saving system where it was not remembering the information of the teddy bear to show when you loaded it into the game. Through further testing, I realized there was a problem with the UI popup. when you reloaded the game there was no UI popup being created or saved. 

Solution: To fix the issue I moved how the UI was being created. At first, it was created in the base item class when there was one thing in the inventory. Then after the UI was created, it would use the created one every time another item was collected. This wouldn't work since when you reload the game, the reference would be lost, and if there was more than one item in your inventory, the UI popup wouldn't be created leading there to no popup being displayed. Now the popup is created when an item is created and uses the first popup to be created for all the items. 

Below you can see the popup on the right. This was after reloading into the game with 2 other items already in my inventory. The popup displays with all the information about the item.


Leave a comment

Log in with itch.io to leave a comment.