Skip to main content

Session Manager

SessionManager is a wrapper class using the PlayPadCommunicator class to help the developer integrate some of the more complicated features listed below. An instance of the SessionManager component can be found on the PlayPadCommunicator prefab.

Public API

SessionManager exposes the following public API:

  • The AuthenticateFromExternalAndConnect method:
    Use this method once per application lifetime. It will connect to PlayPad in order to:

    • Initialize communication
    • Handle external authentication
    • Fetch social tournament, leaderboard, battle wallet and user highscore data (after this step completes, respective communicators can be used to access this data)
    • Raise the FinishSessionInfoUpdate event at the end
  • The ConnectedWithPlayPad property:
    Tracks if AuthenticateFromExternalAndConnect has already been called.

  • The StartSessionInfoUpdate and FinishSessionInfoUpdate events:
    Raised when PlayPad detects changes in authentication (outside of matchmaking or gameplay). Useful for displaying and hiding an "Authentication in progress" overlay.

  • The CurrentSession property:
    Carries some useful data, like IsMobile boolean for UI/controls adjustments or user's Web3 wallet addresses.