API Reference




public class GK_Player {
	public void LoadPhoto(GK_PhotoSize size)

	public string Id {get;}
	public string Alias {get;}
	public string DisplayName {get;}
	public Texture2D SmallPhoto{get;}
	public Texture2D BigPhoto{get;}

	public event Action<GK_UserPhotoLoadResult> OnPlayerPhotoLoaded =  delegate {};


public class ISN_Error {
	public int Code {get;}
	public string Description {get;}


public class GK_RTM_Match  {
	public int ExpectedPlayerCount {get;}
	public List<GK_Player> Players {get;}


public class GK_TBM_Match  {
	//A string that uniquely identifies the match. If you want to store match-specific data elsewhere, use this string as a key. Your game could also save this ID and use it later to load this specific match. To load a specific match, call the GameCenter_TBM.Instance.LoadMatch(matchId);
	public string Id {get;}
	//A text string your game sets to provide a human-readable status for the match. Typically, you update this property before changing the current player. The message is displayed by the standard user interface. If you display a custom interface, you should also display the message.
	public string Message {get;}
	//The participant object for the next player expected to act in the match. This object is always one of the objects stored in the participants array.
	public GK_TBM_Participant CurrentParticipant {get;}
	//Match creation time
	public DateTime CreationTimestamp {get;}
	//States whether the match is still in progress.
	public GK_TurnBasedMatchStatus Status {get;}
	//An array of GK_TBM_Participant objects. The objects in the array are always stored in the same order. You read the properties of participant objects to build your user interface. These objects are also used as inputs to certain methods on the match object.
	public List<GK_TBM_Participant> Participants {get;}
	//Current match data
	public byte[] Data {get;}
	//Match data representation as UTF8 string, usfeul if you JSON format for your match data
	public string UTF8StringData {get;}
	//Methods allow to get partisipant by his id
	public GK_TBM_Participant GetParticipantByPlayerId(string playerId);


public class GK_TBM_Participant  {
	//The player identifier for the player, assuming this seat is filled. Use it to load display names and photos for the player.
	public string PlayerId {get;}
	//GK_Player object, if seat is filled.
	public GK_Player Player {get;}
	//Id of the match associated with the current participant
	public string MatchId {get;}
	//The time at which the player must act before forfeiting a turn. Your game decides what happens when a turn is forfeited. For some games, a forfeited turn might end the match. For other games, you might choose a reasonable set of default actions for the player, or simply do nothing.
	public DateTime TimeoutDate {get;}
	//Last turn date of this participant
	public DateTime LastTurnDate {get;}
	//Declares whether or not this seat is filled and, if it is, declares whether the player is still active in the match.
	public GK_TurnBasedParticipantStatus Status {get;}
	//When a player leaves a match, this property describes what happened to the player. The player may have won or lost the match
	public GK_TurnBasedMatchOutcome MatchOutcome {get;}

	//Set's Outcome for this participant
	public void SetOutcome(GK_TurnBasedMatchOutcome outcome);


public class GK_Invite  {
	public string Id {get;}
	public GK_Player {get;}
	public int PlayerGroup {get;}
	public int PlayerAttributes {get;}



public class ISN_Result  {
	public bool IsSucceeded {get;}
	public bool IsFailed {get;}
    public ISN_Error Error {get;}


public class ISN_PlayerSignatureResult : ISN_Result {
	//The URL for the public encryption key.
	public string PublicKeyUrl {get;}
	//The verification signature data generated.
	public byte[] Signature {get;}
	//A random string used to compute the hash and keep it randomized.
	public byte[] Salt {get;}
	//The date and time that the signature was created.
	public long Timestamp {get;}


public class GK_UserPhotoLoadResult : ISN_Result {
	public Texture2D Photo {get;}
	public GK_PhotoSize Size {get;}


public class GK_RTM_MatchStartedResult : ISN_Result {
	//null, if result is failed
	private GK_RTM_Match Match  {get;}


public class GK_RTM_QueryActivityResult : ISN_Result {
	private int Activity {get;}


public class GK_TBM_LoadMatchResult : ISN_Result {
	public GK_TBM_Match Match {get;}


public class GK_TBM_LoadMatchesResult : ISN_Result {
	public Dictionary<string, GK_TBM_Match> LoadedMatches {get;}


public class GK_TBM_MatchDataUpdateResult : ISN_Result {
	public GK_TBM_Match Match {get;}


public class GK_TBM_MatchInitResult : ISN_Result {
	public GK_TBM_Match Match {get;}


public class GK_TBM_MatchQuitResult : ISN_Result {
	public string MatchId {get;}


public class GK_TBM_EndTrunResult : ISN_Result {
	public GK_TBM_Match Match {get;}


public class GK_TBM_MatchEndResult : ISN_Result {
	public GK_TBM_Match Match {get;}


public class GK_TBM_RematchResult : ISN_Result {
	public GK_TBM_Match Match {get;}


public class GK_TBM_MatchRemovedResult : ISN_Result {
	public string MatchId {get;}




public enum GK_PhotoSize {
	GKPhotoSizeSmall = 0,
	GKPhotoSizeNormal = 1


public enum  GK_MatchSendDataMode  {
	 RELIABLE   = 0,


public enum GK_PlayerConnectionState  {
	Unknown = 0,
	Connected = 1,
	Disconnected = 2


public enum GK_TurnBasedMatchStatus  {
	Unknown   = 0,
	Open      = 1,
	Ended     = 2,
	Matching  = 3


public enum GK_TurnBasedParticipantStatus  {
	Unknown     = 0,
	Invited     = 1,    // a participant has been invited but not yet responded
	Declined    = 2,    // a participant that has declined an invite to this match
	Matching    = 3,    // a participant that is waiting to be matched
	Active      = 4,    // a participant that is active in this match
	Done        = 5,    // a participant is done with this session


public enum GK_TurnBasedMatchOutcome  {
	None         = 0,        // Participants who are not done with a match have this state
	Quit         = 1,        // Participant quit
	Won          = 2,        // Participant won
	Lost         = 3,        // Participant lost
	Tied         = 4,        // Participant tied
	TimeExpired  = 5,        // Game ended due to time running out
	First        = 6,
	Second       = 7,
	Third        = 8,
	Fourth       = 9