TextChatSynchronizable Class

Synchronizes text chat messages for all clients. Can also be used to run commands and cheats.

Definition

Namespace: Alteruna.Multiplayer
Assembly: Alteruna (in Alteruna.dll) Version: 2.0.1+a1176e08a0b4a6bfd8fefeddde6163a16d29e5ab
C#
public class TextChatSynchronizable : Synchronizable
Inheritance
Object    Object    Component    Behaviour    MonoBehaviour    CommunicationBridge    CommunicationBridgeUID    Synchronizable    TextChatSynchronizable

Remarks

TextChatSynchronizable is a chat system that synchronizes with all clients in the room. It is also used with slash commands using the TMP_InputField for input and creating a class that implements ITextChatCommand.

Constructors

Properties

ChatBuffer Get or change the max number of buffered chat lines.

Methods

AssembleData
(Overrides SynchronizableAssembleData(Writer, SerializeInfo))
DisassembleData
(Overrides SynchronizableDisassembleData(Reader, UnserializeInfo))
LogError 
OnDestroy Deregister and unsubscribe from evets.
(Overrides CommunicationBridgeUIDOnDestroy)
Reset 
SendChatMessage 
Start Initializing buffer and subscribe events.
ToString
(Overrides Object.ToString)

Fields

AllowCheats Allow commands that are considered cheats to run.
AllowCommands Allow commands to be run in text chat.
AllowHostToToggleCheats Allows a room owner to enable cheats.
BoldNames Make names in chat bold.
Commands Commands registry.
EnableCheatsInDevEnvironments Default AllowCheats in development environments.
GetUserColor Function to get user color.
InputField Text input field for chat messages.
LogChatInDebugLog Log chat messages to the console debug log.
LogErrors Write Unity errors in chat.
LogFullCommandErrors When true, Show error when the command fails.
LogLocalOnSend When true, show a message for the sender when sending the message. Otherwise, it shows when the message is created.
LogSystemMessages Writes events to text chat. Like user joined.
SetInputActiveAction Input action to select chat input field.
TextChatUpdate Event triggered when the buffer needs to be updated. The whole buffer is sent as a argument.
TextMsgAdded Event triggered when a text message is added to the chat with the new message.
UseRichText Use rich text formatting.
UseTimeStamps Sort messages based on senders timestamp.

See Also