Class GameMode
GameMode is responsible for managing the game state within a specific scene. It acts as a bridge between scene-local systems and the global GameInstance. When a valid GameInstance is present, GameMode facilitates level transitions, session management, and communication with external systems like the server. If no GameInstance is available, GameMode remains inactive and essentially acts as a placeholder to avoid errors or n
[DisallowMultipleComponent]
public sealed class GameMode : MonoBehaviour, IUnityGameService
Inheritance
Implements
Properties
IsLoading
Returns whether the game is currently loading a map.
public bool IsLoading { get; }
Property Value
bool
Methods
EndSession()
Tell Game Intsance to ends the current scene/level and save collected data by invoking the "Next Level" action.
public void EndSession()
RestartLevel()
Tell Game Intsance to restarts the current level and saved collected data by invoking the "Reload Current Level" action.
public void RestartLevel()
RetrieveCurrentSessionInfo()
Retrieves the current session information from the GameInstance.
public SessionInfo RetrieveCurrentSessionInfo()