Skip to content

Game.SceneFlow.SwitchUserScreen

Assembly: Assembly-CSharp
Namespace: Game.SceneFlow

Type: Class

Base: FullScreenOverlay

Summary:
SwitchUserScreen is a small FullScreenOverlay implementation used by the scene flow to trigger a user sign-in (switch user) flow. When executed it creates an input overlay barrier, activates a wait overlay screen, and awaits PlatformManager.instance.SignIn to perform the sign-in operation. It does not perform any custom initialization or store state.


Fields

  • None.
    This class declares no instance fields.

Properties

  • protected override OverlayScreen overlayScreen { get; }
    Returns the overlay screen used by this overlay. This implementation is a read-only expression-bodied override that returns OverlayScreen.Wait so the "wait" overlay is shown while sign-in is in progress.

Constructors

  • public SwitchUserScreen()
    Default parameterless constructor (compiler-provided). No custom initialization is performed.

Methods

  • public override async Task Execute(GameManager manager, CancellationToken token)
    Executes the switch-user flow:
  • Creates an input overlay barrier via InputManager.instance.CreateOverlayBarrier("SwitchUserScreen") to block regular input while the overlay is active.
  • Activates the overlay screen from manager.userInterface.overlayBindings using ActivateScreenScoped(overlayScreen) so the wait overlay is displayed.
  • Calls and awaits PlatformManager.instance.SignIn(SignInOptions.None, null) to trigger the platform sign-in flow.
  • Note: the provided CancellationToken is accepted by the signature but is not observed inside the method. All disposable scopes are wrapped in using statements so they are disposed when the method completes or throws.

Remarks: - Dependencies: InputManager, PlatformManager, GameManager and the game's overlay binding system. - Because Execute is async, callers should await it from an appropriate async context on the game's main/task scheduler.

Usage Example

// From an async method with access to a GameManager and CancellationToken:
var switchScreen = new SwitchUserScreen();
await switchScreen.Execute(gameManager, cancellationToken);