Energy #
The Energy system manages player energy resources used to perform actions within your game. Learn more in the Energy concept guide.
Overview #
The Energy system allows your game to:
- Retrieve current energy levels and timers.
- Spend energy to perform specific actions.
- Grant energy directly to players.
Before You Start #
Make sure you have:
- Unity project configured with Hiro SDK.
- Nakama system integrated (guide).
Working with Energy #
Retrieving Player Energies #
Get all available energies and their timers for the player:
|
|
Spending Energy #
Spend player energy to complete actions:
|
|
Granting Energy #
Directly grant energy resources to a player:
|
|