A downloadable asset pack

Buy Now$4.99 USD or more

This asset is perfect for small games, that want to use a scoring system. You can easily add winning and losing functionalities to your game without having to pay for unnecessary features, that you may not use. The score can be also saved to the PlayerPrefs, so the player can keep his progress. This feature can be turned off if your game has to reset its score.


To use the asset, drag the ScoreController prefab into your scene. It contains functions to add and subtract points and reset the score to zero.

It also contains a function to get the current score.

To display your score you can use the ScoreDisplay prefab, which contains a TMP_Text component. It contains a script that automatically updates the text to display the current score. You can also specify the prefix and suffix of the score, for example, "Score: " and " points".

The ScoreController prefab also contains a script that will automatically save the score to PlayerPrefs when the game is closed, and load the score from PlayerPrefs when the game is opened. This means that the score will be saved between sessions.

If you don't want to save the score between sessions, you can uncheck the SaveScore checkbox in the ScoreController prefab.

To increase and decrease the score you can use the IncreaseButton and DecreaseButton prefabs. They contain a script that automatically increases or decreases the score when the button is pressed. You can also specify the amount to increase or decrease the score by.

You can also use the IncreaseScore and DecreaseScore functions in your scripts to increase or decrease the score.

To get the current score you can use the GetScore function in your scripts.

To reset the score to zero you can use the ResetScore function in your scripts.

If you want to load different scenes when you pass the maxScore or minScore, specified in the ScoreControllerPrefab, you can add the SceneController prefab and specify the win and lose scene names. Remember that they have to be added to the build settings.



The demo scene demonstrates the use of the asset. For it to work, you have to import TMP_Essentials and add the three scenes in the build settings.

Purchase

Buy Now$4.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $4.99 USD. You will get access to the following files:

basicScoringSystem.unitypackage 14 kB

Leave a comment

Log in with itch.io to leave a comment.