Description
The Current
property of the IGameInstance
interface provides access to the current instance of the game. This property is static and can be accessed globally to retrieve the active game instance, which is essential for managing game state and interactions.
Usage
Use the Current
property to access the current game instance. This is particularly useful when you need to interact with the game state or perform operations that require knowledge of the current game context.
Example
// Accessing the current game instance
IGameInstance currentGameInstance = IGameInstance.Current;
// Example usage: Check if the game is loading
if (currentGameInstance.IsLoading)
{
// Perform actions while the game is loading
}