userachievementmanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.UserAchievementManager
The USerAchievementManager is used for fetching and finding achievements that exist for the current user.
List<UserAchievement> UserAchievements
Stores all the UserAchievements contained in the Manager.
Adds a UserAchievement to the internally managed list without persistence.
Note
This method is deprecated
Returns void
UserAchievementManager.Add( userAchievement )
UserAchievement userAchievement
Instance of a UserAchievement to add internally
--------------------------------------------------------------------------------Finds the UserAchievement with the specified UserAchievementID if it exists, otherwise returns null.
Returns UserAchievement
UserAchievementManager.FindByUserAchievementID( userAchievementID )
long userAchievementID
The ID of the UserAchievement to find
--------------------------------------------------------------------------------Finds the UserAchievement with the specified AchievementID if it exists, otherwise returns null.
Returns UserAchievement
UserAchievementManager.FindByAchievementID( achievementID )
long achievementID
The ID of the Achievement to find
--------------------------------------------------------------------------------Gets the number of UserAchievements currently managed internally.
Returns int
UserAchievementManager.GetCount( )
Gets the UserAchievement at the specified index if it exists, otherwise returns null.
Returns UserAchievement
UserAchievementManager.Get( index )
int index
The index of the UserAchievement to find
--------------------------------------------------------------------------------Returns the index of the specified UserAchievement if it exists, otherwise returns -1.
Returns int
UserAchievementManager.IndexOf( userAchievement )
UserAchievement userAchievement
Instance of the UserAchievement to find the index of
--------------------------------------------------------------------------------Returns the index of the UserAchievement with the specified UserAchievementID if it exists, otherwise returns -1.
Returns int
UserAchievementManager.IndexOfByUserAchievementID( userAchievementID )
long userAchievementID
The ID of the UserAchievement to find the index of
--------------------------------------------------------------------------------Returns the index of the UserAchievement with the specified AchievementID if it exists, otherwise returns -1.
Returns int
UserAchievementManager.IndexOfByAchievementID( achievementID )
long achievementID
The ID of the Achievement to find the index of
--------------------------------------------------------------------------------Removes a UserAchievement from the internally managed list. This does not delete the user achievement from the session's account persistently.
Note
This method is deprecated
Returns void
UserAchievementManager.Remove( index )
int index
The index of the UserAchievement to be removed.
--------------------------------------------------------------------------------Does a one for one copy of the user achievements contained in the passed manager to this manager.
Note
This method is deprecated
Returns void
UserAchievementManager.PopulateFrom( manager )
UserAchievementManager manager
The manager to copy from
--------------------------------------------------------------------------------Awards a UserAchievement. Upon success, this will automatically update the internal list.
Returns void
UserAchievementManager.Award( achievementID, actionName, roomID, userAchievementProperties, notificationMessage, callbackFunc )
long achievementID
The ID of the Achievement to award.
[string](#) actionNameThe Action of the Achievements to award.
[long](#) roomIDThe ID of the Room the UserAchievement is being awarded in.
[PropertyCollection](./propertycollection) userAchievementPropertiesThe properties to assign to the UserAchievement. Pass in null to assign no properties.
[string](#) notificationMessageThe notification message to send to the User. Pass in "" if no notification should be sent.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Deletes a UserAchievement. Upon success, this will automatically update the internal list.
Returns void
UserAchievementManager.Delete( userAchievementID, callbackFunc )
long userAchievementID
The ID of the UserAchievement to delete.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Gets all UserAchievements assigned to the User. Upon success, this will automatically update the internal list.
Returns void
UserAchievementManager.GetAll( callbackFunc )
OnCompleteHandler callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------Purchases a UserAchievement. Upon success, this will automatically update the internal list.
Note
This method is deprecated
Returns void
UserAchievementManager.Purchase( achievementID, roomID, userAchievementProperties, callbackFunc )
long achievementID
The ID of the Achievement to purchase.
[long](#) roomIDThe ID of the Room the UserAchievement is being purchased in.
[PropertyCollection](./propertycollection) userAchievementPropertiesThe properties to assign to the UserAchievement. Pass in null to assign no properties.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Sells a UserAchievement. Upon success, this will automatically update the internal list.
Note
This method is deprecated
Returns void
UserAchievementManager.Sell( userAchievementID, callbackFunc )
long userAchievementID
The ID of the Achievement to sell.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------