Skip to content

7. Mini Game UI

Raphaël Tétreault edited this page Oct 24, 2025 · 1 revision

Overview

This page contains information about scripts which display key UI information during a mini game such as current mini game state, mini game winner/loser, and game time remaining.

Mini Game Manager Message UI

File: MiniGameManagerMessageUI.cs

The script will listen for game loop events from the Mini Game Manager and update a TextMeshPro text UI item each event trigger. The specific events are:

OnCountDown

UI displays "3", "2", "1", then the specified countdown message in the MiniGameManager.CountDownStartMessage field (value in the inspector).

OnGameEnd

UI displays "Finish!" when time runs out.

OnGameWinner

UI displays which player won or if the game was a tie. If an error text displays, it means no script has set the winner. One of your scripts must assign the game winner via the MiniGameManager.Winner property before this time.

Mini Game Manager Timer UI

There are two timer variants. One that displays time as a decimal number (float) called MiniGameManagerFloatTimerUI.cs and another that displays time as a whole number (integer) MiniGameManagerIntTimerUI.cs.

Only use one of these two scripts per scene.

The script will listen for time events from the Mini Game Manager and update a TextMeshPro text UI item each event trigger and display the remaining time in a mini game.

Before the game begins, the full amount of time set on the MiniGameManager will be shown. Once the game begins, the remaining time in seconds will be show with the Int timer, while the Float timer will display time using the specified Format string field on the timer script. By default, the format includes two decimal places.

Clone this wiki locally