IProjectVAuthenticatedSceneGate interface
Guards scenes that need a signed-in player. A scene checks IsReady; when it is false, it saves itself with RequestReturnTo and opens Login. After sign-in, Login opens the scene from ConsumeReturnScene. You load the scenes; the gate only remembers where to go.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Authentication
public interface IProjectVAuthenticatedSceneGate
Properties
| Property | Type | Description |
|---|---|---|
IsReady | bool | True when a player is signed in and the game data is ready, so the scene can open. |
Methods
RequestReturnTo(string sceneName)
Remembers the scene to open after the next sign-in. A later call replaces it.
void RequestReturnTo(string sceneName);
Parameters
| Name | Type | Description |
|---|---|---|
sceneName | string | The scene name to return to; must not be null or blank. |
Exceptions
| Exception | When |
|---|---|
ArgumentException | sceneName is null or blank. |
ConsumeReturnScene(string fallbackSceneName)
Returns the remembered scene and forgets it, so it is used only once.
string ConsumeReturnScene(string fallbackSceneName);
Parameters
| Name | Type | Description |
|---|---|---|
fallbackSceneName | string | The scene to open when none is remembered, such as the Lobby; must not be null or blank. |
Returns
string: The remembered scene name, or fallbackSceneName when none is remembered.
Exceptions
| Exception | When |
|---|---|
ArgumentException | fallbackSceneName is null or blank. |
ClearReturnScene()
Forgets the remembered scene, for example when the player signs out.
void ClearReturnScene();