The base class for a script that responds to messages from the Skillz SDK about events related to synchronous tournaments. All of the optional methods will by default not do anything when called. These callbacks can be used to control game flow or aggresively clean up resources you no longer need. More...

Public Member Functions | |
void | OnMatchCompleted () |
This method will be triggered on all clients when one client has explicitly reported a score or aborted. More... | |
void | OnDidReceiveData (byte[] value) |
When another instance of your client connected to the same match sends data using SendData , this method will be called on all other clients More... | |
void | OnCurrentPlayerHasLostConnection () |
This method will be called when the current player's connection has failed, and Skillz is attempting to reconnect. This will allow you to pause the game while waiting for the player to reconnect. More... | |
void | OnCurrentPlayerHasReconnected () |
This method will be called when the current player, who previously disconnected, has successfully reconnected within the timeout. When receiving this callback, you should sync game data between all clients, and then resume gameplay. More... | |
void | OnCurrentPlayerHasLeftMatch () |
This method will be called when the current user has left the match (due to connection failure or abort) and is unable to rejoin. At this point, Skillz will consider this player as having forfeited the match. More... | |
void | OnOpponentHasLostConnection (UInt64 playerId) |
This method will be called when an opponent's connection has failed, and Skillz is attempting to reconnect. This will allow you to pause the game while waiting for the opponent to reconnect. More... | |
void | OnOpponentHasReconnected (UInt64 playerId) |
This method will be called when an opponent, who previously disconnected, has successfully reconnected within the timeout. When receiving this callback, you should sync game data between all clients, and then resume gameplay. More... | |
void | OnOpponentHasLeftMatch (UInt64 playerId) |
This method will be called when an opponent has left the match (due to connection failure or abort) and is unable to rejoin. At this point, Skillz will consider this player as having forfeited the match. More... | |
![]() | |
void | OnMatchWillBegin (Match matchInfo) |
This method is called when a user starts a match from Skillz This method is required to impelement. More... | |
void | OnSkillzWillExit () |
This method is called when a user exits the Skillz experience (via Menu -> Exit) This method is optional to impelement. This method is usually used only if your game has its own Main Menu. More... | |
Detailed Description
The base class for a script that responds to messages from the Skillz SDK about events related to synchronous tournaments. All of the optional methods will by default not do anything when called. These callbacks can be used to control game flow or aggresively clean up resources you no longer need.
Member Function Documentation
void SkillzSyncDelegate.OnCurrentPlayerHasLeftMatch | ( | ) |
This method will be called when the current user has left the match (due to connection failure or abort) and is unable to rejoin. At this point, Skillz will consider this player as having forfeited the match.
Note: You should follow up by calling "AbortMatch" after cleaning up your game state, in order to pass control back to Skillz.
void SkillzSyncDelegate.OnCurrentPlayerHasLostConnection | ( | ) |
This method will be called when the current player's connection has failed, and Skillz is attempting to reconnect. This will allow you to pause the game while waiting for the player to reconnect.
void SkillzSyncDelegate.OnCurrentPlayerHasReconnected | ( | ) |
This method will be called when the current player, who previously disconnected, has successfully reconnected within the timeout. When receiving this callback, you should sync game data between all clients, and then resume gameplay.
void SkillzSyncDelegate.OnDidReceiveData | ( | byte[] | value | ) |
When another instance of your client connected to the same match sends data using SendData
, this method will be called on all other clients
- Parameters
-
data Data that was sent
void SkillzSyncDelegate.OnMatchCompleted | ( | ) |
This method will be triggered on all clients when one client has explicitly reported a score or aborted.
void SkillzSyncDelegate.OnOpponentHasLeftMatch | ( | UInt64 | playerId | ) |
This method will be called when an opponent has left the match (due to connection failure or abort) and is unable to rejoin. At this point, Skillz will consider this player as having forfeited the match.
Note: You should follow up by gracefully ending the game, and reporting your player's score in order to pass control back to Skillz.
- Parameters
-
playerId ID of Player that left
void SkillzSyncDelegate.OnOpponentHasLostConnection | ( | UInt64 | playerId | ) |
This method will be called when an opponent's connection has failed, and Skillz is attempting to reconnect. This will allow you to pause the game while waiting for the opponent to reconnect.
- Parameters
-
playerId ID of Player that disconnected
void SkillzSyncDelegate.OnOpponentHasReconnected | ( | UInt64 | playerId | ) |
This method will be called when an opponent, who previously disconnected, has successfully reconnected within the timeout. When receiving this callback, you should sync game data between all clients, and then resume gameplay.
- Parameters
-
playerId ID of Player that reconnected
The documentation for this interface was generated from the following file:
- /Users/Shared/jenkins-slave/workspace/SDK-OLD/Cross-Platform-SDK/Cross-Platform-Unity-Package/UnityTestApps/Unity/Assets/Skillz/SkillzSyncDelegate.cs