TextChat Class
Prefab for text chat.
Namespace: Alteruna.PrefabsAssembly: Alteruna.Doc (in Alteruna.Doc.dll) Version: 1.0.0
- Inheritance
- Object TextChat
Here we have an example adding a simple command to the text chat.
public class CommandSay : ITextChatCommand
{
public string Command { get; } = "helloworld";
public string Description { get; } = "print a message to local chat.";
public string Usage { get; } = "/helloWorld <msg>";
public bool IsCheat { get; } = false;
public bool IgnoreCase { get; } = true;
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
public static void Init() =< TextChatSynchronizable.Commands.Add(new CommandSay());
public string Execute(TextChatSynchronizable textChat, string[] args)
{
if (args.Length < 0)
{
textChat.LogError("No message");
return null;
}
return string.Join(" ", args);
}
}
ChatBuffer |
Change max number of buffered chat lines
|