usernotificationmanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.UserNotificationManager
The UserNotificationManager class contains a collection UserNotifications. With this class, a developer will be able to Create, Delete, Retrieve All, and Process UserNotifications.
List<UserNotification> UserNotifications
Stores all the UserNotifications contained in the Manager.
Adds a UserNotification to the internally managed list without persistence.
Note
This method is deprecated
Returns void
UserNotificationManager.Add( userNotification )
UserNotification userNotification
Instance of a UserNotification to add internally
--------------------------------------------------------------------------------Finds the UserNotification with the specified UserNotificationID if it exists, otherwise returns null.
Returns UserNotification
UserNotificationManager.FindByUserNotificationID( userNotificationID )
long userNotificationID
The ID of the UserNotification to find
--------------------------------------------------------------------------------Gets the number of UserNotifications currently managed internally.
Returns int
UserNotificationManager.GetCount( )
Gets the UserNotification at the specified index if it exists, otherwise returns null.
Returns UserNotification
UserNotificationManager.Get( index )
int index
The index of the UserNotification to find
--------------------------------------------------------------------------------Returns the index of the specified UserNotification if it exists, otherwise returns -1.
Returns int
UserNotificationManager.IndexOf( userNotification )
UserNotification userNotification
Instance of the UserNotification to find the index of
--------------------------------------------------------------------------------Returns the index of the UserNotification with the specified UserNotificationID if it exists, otherwise returns -1.
Returns int
UserNotificationManager.IndexOfByUserNotificationID( userNotificationID )
long userNotificationID
The ID of the UserNotification to find the index of
--------------------------------------------------------------------------------Removes a UserNotification from the internally managed list. This does not delete the notification from the user's account persistently.
Note
This method is deprecated
Returns void
UserNotificationManager.Remove( index )
int index
The index of the UserNotification to remove internally
--------------------------------------------------------------------------------Creates a new UserNotification. Upon success, this will automatically update the internal list.
Returns void
UserNotificationManager.Create( destUserID, type, message, originalGameInstanceID, gameInstanceID, achievementID, chatRoomID, itemID, itemCount, socialType, socialID, callbackFunc )
long destUserID
The ID of the User to send the UserNotification to.
[string](#) typeThe type of UserNotification being created.
[string](#) messageThe message of the UserNotification.
[long](#) originalGameInstanceIDThe original GameInstanceID played before creating a rematch. Pass in 0 if this UserNotification does not pertain to a rematch.
[long](#) gameInstanceIDThe ID of the GameInstance assigned to the UserNotification.
[long](#) achievementIDThe ID of the Achievement assigned to the UserNotification.
[long](#) chatRoomIDThe ID of the ChatRoom assigned to the UserNotification.
[long](#) itemIDThe ID of the Item assigned to the UserNotification.
[int](#) itemCountThe number of Items assigned to the UserNotification.
[string](#) socialTypeThe type of social network which caused the UserNotification to be created. Pass in "FB" for Facebook. Pass in "" if not specified.
[string](#) socialIDThe ID of the user on a social network. Pass in the user's FacebookID for Facebook. Pass in "0" if not specified.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Deletes a UserNotification. Upon success, this will automatically update the internal list.
Returns void
UserNotificationManager.Delete( userNotificationID, callbackFunc )
long userNotificationID
The ID of the UserNotification to delete.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Gets all UserNotifications for the User. Upon success, this will automatically update the internal list.
Returns void
UserNotificationManager.GetAll( processed, callbackFunc )
bool processed
A boolean indicating whether processed or unprocessed UserNotifications should be retrieved.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Processes a UserNotification. Upon success, this will automatically update the internal list.
Returns void
UserNotificationManager.Process( userNotificationID, accepted, callbackFunc )
long userNotificationID
The ID of the UserNotification that is to be processed.
[bool](#) acceptedA boolean indicated whether the UserNotfication was accepted. Users must accept UserNotifications in order to create/join a rematch GameInstance or be awarded Achievements or Items.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------