usergamemanager - TogetherGames/Public-Unity-CSharp GitHub Wiki

UserGameManager

together.UserGameManager

Overview

The UserGameManager class is for finding and fetching games played by the user.


Members

List<UserGame> UserGames

Stores all the UserGames contained in the Manager.


Methods


FindByUserGameID()

Finds the UserGame with the specified UserGameID if it exists, otherwise returns null

Returns UserGame
Syntax
UserGameManager.FindByUserGameID( userGameID )
Parameters

long userGameID

The ID of the UserGame to find

--------------------------------------------------------------------------------

GetCount()

Gets the number of UserGames currently managed internally.

Returns int
Syntax
UserGameManager.GetCount(  )

Get()

Gets the UserGame at the specified index if it exists, otherwise returns null

Returns UserGame
Syntax
UserGameManager.Get( index )
Parameters

int index

The index of the UserGame to find

--------------------------------------------------------------------------------

IndexOf()

Returns the index of the specified UserGame if it exists, otherwise returns -1.

Returns int
Syntax
UserGameManager.IndexOf( userGame )
Parameters

UserGame userGame

Instance of the UserGame to find the index of

--------------------------------------------------------------------------------

IndexOfByGameID()

Returns the index of the UserGame with the specified GameID if it exists, otherwise returns -1.

Returns int
Syntax
UserGameManager.IndexOfByGameID( gameID )
Parameters

long gameID

The ID of the Game to find the index of

--------------------------------------------------------------------------------

Remove()

Removes a UserGame from the internally managed list. This does not delete the user game from the user's account persistently.

Note
This method is deprecated

Returns void
Syntax
UserGameManager.Remove( index )
Parameters

int index

The index of the UserGame to remove internally

--------------------------------------------------------------------------------

PopulateFrom()

Does a one for one copy of the user games contained in the passed manager to this manager.

Note
This method is deprecated

Returns void
Syntax
UserGameManager.PopulateFrom( manager )
Parameters

UserGameManager manager

The manager to copy from

--------------------------------------------------------------------------------

GetAll()

Gets all UserGames played by the User. Upon success, this will automatically update the internal list.

Returns void
Syntax
UserGameManager.GetAll( callbackFunc )
Parameters

OnCompleteHandler callbackFunc

The function to call upon completion.

--------------------------------------------------------------------------------
⚠️ **GitHub.com Fallback** ⚠️