achievementmanager - TogetherGames/Public-Unity-CSharp GitHub Wiki

AchievementManager

together.AchievementManager

Overview

The AchievementManager is used for fetching and finding achievements that exist for the current game.


Members

List<string> Achievements

Stores all the Achievements contained in the Manager.


Methods


Add()

Adds an Achievement to the manager internally without persistence.

Note
This method is deprecated

Returns void
Syntax
AchievementManager.Add( achievement )
Parameters

Achievement achievement

Instance of an Achievement to add internally

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

FindByAchievementID()

Finds the Achievement with the specified AchievementID if it exists, otherwise returns null.

Returns Achievement
Syntax
AchievementManager.FindByAchievementID( achievementID )
Parameters

long achievementID

The ID of the Achievement to find

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

GetCount()

Gets the number of Achievements currently managed internally.

Returns int
Syntax
AchievementManager.GetCount(  )

Get()

Gets the Achievement at the specified index if it exists internally, otherwise returns null.

Returns Achievement
Syntax
AchievementManager.Get( index )
Parameters

int index

The index of the Achievement to retrieve internally.

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

IndexOf()

Returns the index of the specified Achievement instance if it exists internally, otherwise returns -1.

Returns int
Syntax
AchievementManager.IndexOf( achievement )
Parameters

Achievement achievement

Instance of the Achievement to find the index of

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

IndexOfByAchievementID()

Returns the index of the Achievement with the cooresponding AchievementID if it exists internally, otherwise returns -1.

Returns int
Syntax
AchievementManager.IndexOfByAchievementID( achievementID )
Parameters

long achievementID

The ID of the Achievement to find the index of

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

Remove()

Removes an Achievement from the internally managed list. This does not delete the Achievement from the game persistently.

Note
This method is deprecated

Returns void
Syntax
AchievementManager.Remove( index )
Parameters

int index

The index of the Achievement to be removed internally

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

GetAll()

Requests a list of the Achievements configured for the current game.

Returns void
Syntax
AchievementManager.GetAll( callbackFunc )
Parameters

OnCompleteHandler callbackFunc

The function to call upon completion

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