ProjectVAuthenticatedSceneScope class
Base class for the scope of a scene that needs a signed-in player, such as the lobby. Subclass it, register the scene's UI in ConfigureAuthenticated, and inject the ProjectV screens and presenters from it. When no player is signed in with game data ready, the scene is disabled and the player is sent to Login. The scene is saved so Login can open it again with IProjectVAuthenticatedSceneGate.ConsumeReturnScene after sign-in.
Namespace: SilverTiger.ProjectV.Unity.Presentation
public abstract class ProjectVAuthenticatedSceneScope : LifetimeScope
Properties​
| Property | Type | Description |
|---|---|---|
LoginSceneName (protected) | string | The name of the Login scene to send the player to. Override it if yours is not Login. |
Methods​
FindParent() (protected)​
Uses the ProjectV scope as the parent once a player is signed in with game data ready.
protected override LifetimeScope? FindParent();
Returns
LifetimeScope?: The ProjectV scope, or null when no player is ready.
Configure(IContainerBuilder builder) (protected)​
Calls ConfigureAuthenticated when a player is ready. Otherwise it skips your registrations, calls DisableScenePresentation, and on the next frame calls NavigateToLogin unless the Login scene is already active.
protected override void Configure(IContainerBuilder builder);
Parameters
| Name | Type | Description |
|---|---|---|
builder | IContainerBuilder | The container builder for this scene. |
ConfigureAuthenticated(IContainerBuilder builder) (protected)​
Register this scene's UI here. Called only when a player is ready.
protected abstract void ConfigureAuthenticated(IContainerBuilder builder);
Parameters
| Name | Type | Description |
|---|---|---|
builder | IContainerBuilder | The container builder for this scene. |
DisableScenePresentation() (protected)​
Hide or disable this scene's UI because nobody is signed in and the player is about to be sent to Login.
protected abstract void DisableScenePresentation();
NavigateToLogin(string sceneName) (protected)​
Load the Login scene, for example with SceneManager.LoadScene(sceneName).
protected abstract void NavigateToLogin(string sceneName);
Parameters
| Name | Type | Description |
|---|---|---|
sceneName | string | The scene to load; the value of LoginSceneName. |