Chats Module

The chat module helps you create in-game chats, both private and group. An example of using the chat module can be seen in the folder MasterServerToolkit -> Demos -> BasicChat. The screenshot below shows a window from an example of chats.

Open MasterServer scene from demo folder and find chats module in scene hierarchy.

In the inspector window you will see several parameters.

  • Use Auth module - If the value is true, the chat module will subscribe to the authentication module and automatically add the user to the chat module when logging in. After that, the user is ready to receive chat messages from others.
  • Use Censor module - If false, chats will be checked through CensorModule to find use of forbidden words in messages.
  • Set first channel as local - If true, the first channel that user joins will be set as his default channel
  • Set last channel as local - If true, when user leaves all of the channels except for one, that one channel will be set to be his default channel
  • Allow username picking - If true, users will be allowed to choose their own usernames.
  • Min channel name length - Min number of character a channel name must consist of
  • Max channel name length - Max number of character a channel name must consist of

To interact with the chat module, use its API