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 ifAuthenticateFromExternalAndConnect
has already been called. -
The
StartSessionInfoUpdate
andFinishSessionInfoUpdate
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, likeIsMobile
boolean for UI/controls adjustments or user's Web3 wallet addresses.