Least score counter UI in unity

edited in General
Hi there

I am still pretty new to coding in unity and am looking for a way to add a Lowest score UI. There are hundreds of Youtube videos showing how to add a highest score counter to a game, but the game I am working on is about keeping score of the least amount of moves done to complete the game and keeping that score.

If the number of moves is less than the previous game played then the UI should only keep that score.

Does anyone know where I could find out how to achieve this using a simple highest score counter script?



  • You're asking for two different things: The UI is just how to show information, so using TextMeshPro would let you display text.

    Then are you trying to compare the number of moves across one game session, or are you trying to SAVE a variable so that it will remember after closing the game and starting it again? If you want something that works across game sessions then it's more complicated, you have to save data. If not then it's just a matter of saving the previous number of moves in a variable, comparing the number of moves now to the previous variable, and changing the previous variable to the new one if it's less.
Sign In or Register to comment.