Configure Prohibited Words
Apply filtering words configured in the console.
Console Filtering Configuration

- Go to Console > Chat > Settings.
- Add words needed for filtering.
- Words must be separated by commas.
- Click the Save button.
Method Information
| Method | Description |
|---|---|
| FetchFilterWords() | Fetch prohibited words list from server |
| Filter(string message, char separator = '*') | Apply prohibited word filter to message |
Parameters
Filter Method
| Parameter | Type | Description |
|---|---|---|
| message | string | Message to filter |
| separator | char | Character to replace prohibited words with (default: '*') |
Unity C# Usage Example
using UnityEngine;
using UnityEngine.UI;
public class ChatExample : MonoBehaviour, IChatListener
{
public InputField _inputChat;
public Text _textView;
public void OnConnected()
{
Debug.Log("Chat Connected");
// Fetch prohibited words list on successful connection
ChatManager.Instance.FetchFilterWords();
ChatManager.Instance.Subscribe("CH01");
}
public void SendMessage()
{
// Send message with prohibited word filter applied
ChatManager.Instance.SendPublicMessage("CH01", ChatManager.Instance.Filter(_inputChat.text));
_inputChat.text = "";
}
public void OnPublicMessage(ChatUserInfo sender, string message)
{
// Apply prohibited word filter to received message
_textView.text += $"\n[{sender.visitorName}] {ChatManager.Instance.Filter(message)}";
}
public void OnPrivateMessage(ChatUserInfo sender, string message)
{
// Apply prohibited word filter to whisper
Debug.Log($"[Whisper from {sender.visitorName}] {ChatManager.Instance.Filter(message)}");
}
public void OnNotifyMessage(ChatUserInfo sender, string message)
{
Debug.Log($"[System] {message}");
_textView.text += $"\n[{sender.visitorName}] {ChatManager.Instance.Filter(message)}";
}
// ... Other IChatListener method implementations
}