<aside> πŸ’‘ The Lives System manages the player's lives count, automatic restoration timer, infinite mode, and life locking during gameplay.

</aside>

Setup

Create a LivesData asset

Create a new LivesData ScriptableObject via Assets β†’ Create β†’ Data β†’ Lives. Configure the following fields:

image.png

Add to Project Init Settings

Open the Init scene, select the Initializer object, and add LivesSystemInitModule to the modules list. Assign the LivesData asset to the Lives Data field.

image.png

UI Components

LivesIndicator

LivesIndicator is a MonoBehaviour that displays the current lives state in the HUD. It subscribes to LivesSystem.StatusChanged and updates automatically.