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
AuthenticateFromExternalAndConnectmethod:
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
FinishSessionInfoUpdateevent at the end
-
The
ConnectedWithPlayPadproperty:
Tracks ifAuthenticateFromExternalAndConnecthas already been called. -
The
StartSessionInfoUpdateandFinishSessionInfoUpdateevents:
Raised when PlayPad detects changes in authentication (outside of matchmaking or gameplay). Useful for displaying and hiding an "Authentication in progress" overlay. -
The
CurrentSessionproperty:
Carries some useful data, likeIsMobileboolean for UI/controls adjustments or user's Web3 wallet addresses.