useritemmanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.UserItemManager
The UserItemManager is used for fetching and finding items that exist for the current user.
Stores all the UserItems contained in the Manager.
Adds a UserItem to the internally managed list without persistence.
Note
This method is deprecated
Returns void
UserItemManager.Add( userItem )
UserItem userItem
Instance of a UserItem to add internally
--------------------------------------------------------------------------------Finds the UserItem with the specified UserItemID if it exists, otherwise returns null.
Returns UserItem
UserItemManager.FindByUserItemID( userItemID )
long userItemID
The ID of the UserItem to find
--------------------------------------------------------------------------------Gets the number of UserItems currently managed internally.
Returns int
UserItemManager.GetCount( )
Gets the UserItem at the specified index if it exists, otherwise returns null.
Returns UserItem
UserItemManager.Get( index )
int index
The index of the UserItem to find
--------------------------------------------------------------------------------Returns the index of the specified UserItem if it exists, otherwise returns -1.
Returns int
UserItemManager.IndexOf( userItem )
UserItem userItem
Instance of the UserItem to find the index of
--------------------------------------------------------------------------------Returns the index of the UserItem with the specified UserItemID if it exists, otherwise returns -1.
Returns int
UserItemManager.IndexOfByUserItemID( userItemID )
long userItemID
The ID of the UserItem to find the index of
--------------------------------------------------------------------------------Removes a UserItem from the internally managed list. This does not delete the user item from the user's account persistently.
Note
This method is deprecated
Returns void
UserItemManager.Remove( index )
int index
The index of the UserItem to remove internally
--------------------------------------------------------------------------------Does a one for one copy of the user items contained in the passed manager to this manager.
Note
This method is deprecated
Returns void
UserItemManager.PopulateFrom( manager )
UserItemManager manager
The manager to copy from
--------------------------------------------------------------------------------Awards a UserItem. Upon success, this automatically updates the internal list.
Returns void
UserItemManager.Award( itemID, roomID, userItemProperties, callbackFunc )
long itemID
The ID of the Item to award.
[long](#) roomIDThe ID of the Room the UserItem is being awarded in.
[PropertyCollection](./propertycollection) userItemPropertiesThe properties to assign to the UserItem. Pass null to assign no properties.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Creates a UserItem. Upon success, this automatically updates the internal list.
Returns void
UserItemManager.Create( itemID, roomID, userItemProperties, callbackFunc )
long itemID
The ID of the Item to create a UserItem from.
[long](#) roomIDThe ID of the Room the UserItem is being awarded in.
[PropertyCollection](./propertycollection) userItemPropertiesThe properties to assign to the UserItem. Pass null to assign no properties.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Deletes a UserItem. Upon success, this automatically updates the internal list.
Returns void
UserItemManager.Delete( userItemID, callbackFunc )
long userItemID
The ID of the UserItem to delete.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Gets all UserItems assigned to the User. Upon success, this automatically updates the internal list.
Returns void
UserItemManager.GetAll( callbackFunc )
OnCompleteHandler callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------Purchases a UserItem. Upon success, this automatically updates the internal list.
Returns void
UserItemManager.Purchase( itemID, roomID, userItemProperties, callbackFunc )
long itemID
The ID of the Item to purchase.
[long](#) roomIDThe ID of the Room the UserItem is being awarded in.
[PropertyCollection](./propertycollection) userItemPropertiesThe properties to assign to the UserItem. Pass null to assign no properties.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Sells a UserItem. Upon success, this automatically updates the internal list.
Returns void
UserItemManager.Sell( userItemID, callbackFunc )
long userItemID
The ID of the UserItem to sell.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------