Inventory items flash when game is paused.

When items are moved around, added, or removed from my inventory menu, their icons flash, but this only happens when the game is paused. I don’t know why this would only happen when paused, so I don’t know where to look to solve it.

In case it is confusing; I pause and unpause the game in the video, which is why the flashing of those pink icons changes through the video.

I resized some UI elements and thought I solved the problem, but it was just the single tile icons were sized properly and did not flash. The problem happens with any icons that are multiple tiles in size (the tiles of the inventory grid).

When anything is added, removed, or moved in the inventory, it is refreshed; new item widgets are created and their icons are set to their desired size. It seems to be this part that is causing the flashing. A widget begins as the single tile size and quickly resized to match the items desired slot size. For some reason, when the game is paused (using Set Game Paused) this flashing happens, and it does not happen when the game is not paused. Nothing is happening on tick in the inventory menu, so tick when paused should not be the issue. I don’t know what to try.

The flashing might be due to how the game handles rendering when it’s paused. Try disabling the tick function for your inventory items when the game is paused. Also, making sure the UI elements aren’t updating or being redrawn while paused might do the trick.

Thanks, It seems UI will always tick even when paused. I found the problem though, it was a strange interaction with the OnInitialize UMG event; since Construct happens before all the data is initialized in the new widget, I set it to refresh OnInitialize, which was also had problems with all the data being available right away which caused the icons to act strangely.

I set my refresh function to happen on a Do Once on tick and that seemed to work. :melting_face:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.