chatroommanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.ChatRoomManager
The ChatRoomManager is used for fetching and finding chatrooms that exist for the current game.
Stores all the ChatRooms contained in the Manager.
Adds a ChatRoom to the manager internally without persistence.
Note
This method is deprecated
Returns void
ChatRoomManager.Add( chatRoom )
ChatRoom chatRoom
Instance of a ChatRoom to add internally
--------------------------------------------------------------------------------Finds the ChatRoom with the specified ChatRoomID if it exists, otherwise returns null.
Returns ChatRoom
ChatRoomManager.FindByChatRoomID( chatRoomID )
long chatRoomID
The ID of the ChatRoom to find
--------------------------------------------------------------------------------Gets the number of ChatRooms currently managed by the internal list
Returns int
ChatRoomManager.GetCount( )
Gets the ChatRoom at the specified index if it exists, otherwise returns null.
Returns ChatRoom
ChatRoomManager.Get( index )
int index
The index of the ChatRoom to retrieve
--------------------------------------------------------------------------------Returns the index of the specified ChatRoom if it exists, otherwise returns -1
Returns int
ChatRoomManager.IndexOf( chatRoom )
ChatRoom chatRoom
Instance of the ChatRoom to retrieve the index of
--------------------------------------------------------------------------------Returns the index of the ChatRoom with the specified ChatRoomID if it exists, otherwise returns -1.
Returns int
ChatRoomManager.IndexOfByChatRoomID( chatRoomID )
long chatRoomID
The ID of the ChatRoom to find the index of
--------------------------------------------------------------------------------Removes a ChatRoom from the managed list without persistence.
Note
This method is deprecated
Returns void
ChatRoomManager.Remove( The )
int The
index of the ChatRoom to be removed if it exists
--------------------------------------------------------------------------------Post processes the ChatRoomUser's usernames. If a User is registered, its Name member will be assigned the name from their social network account. Otherwise, the Name member will be set to the User's Username.
Returns void
ChatRoomManager.PostProcessUsernames( )
Creates a ChatRoom that can be associated to a Game Instance and optionally joined immediately.
Returns void
ChatRoomManager.Create( name, description, roomID, gameInstanceID, chatRoomProperties, callbackFunc )
string name
The name of the new ChatRoom.
[string](#) descriptionThe description for the new ChatRoom.
[long](#) roomIDThe ID of the room the ChatRoom is in. Pass in 0 for no room.
[long](#) gameInstanceIDThe ID of the GameInstance the ChatRoom is associated with. GameInstances associated with ChatRooms will retrieved when GameInstanceManager:GetAll() is called.
[PropertyCollection](./propertycollection) chatRoomPropertiesThe properties to associate with the ChatRoom. Pass in null if no properties should be associated.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Deletes a ChatRoom with the specified ID.
Returns void
ChatRoomManager.Delete( chatRoomID, callbackFunc )
long chatRoomID
The ID of the ChatRoom to delete
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion
--------------------------------------------------------------------------------Gets all ChatRooms or optionally all a specific user is a member of.
Returns void
ChatRoomManager.GetAll( getForUserID, callbackFunc )
long getForUserID
The ID of the User to get ChatRooms for. When specified, only the ChatRooms the User is a member of will be retrieved. Pass in 0 to retrieve all ChatRooms.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------