API ReferenceSandbox.Platform

Chatclass

Platform-level text chat system. Provides an API for sending and receiving chat messages to users.

objectChat
Namespace
Sandbox.Platform
Assembly
Sandbox.Engine
Declaration
public static abstract sealed class Sandbox.Platform.Chat

Methods2

Showing 2 methods

public static void AddText(string message)PUBLICSTATIC

Add a notification to the chat. This is local-only and has no sender.

ParameterTypeDescription
messagestring
Returns:void

public static void Say(string message)PUBLICSTATIC

Says a message in chat. This will be sent to the host, validated, then filtered to clients.

ParameterTypeDescription
messagestring
Returns:void

Properties3

Showing 3 properties

public static bool Sandbox.Platform.Chat.Enabled { get; set; }PUBLICSTATICGETSET

Whether chat is enabled for the current game.

Returns:bool

public static int Sandbox.Platform.Chat.MaxMessageLength { get; set; }PUBLICSTATICGETSET

Maximum length of a single chat message.

Returns:int

public static bool Sandbox.Platform.Chat.ShowUI { get; set; }PUBLICSTATICGETSET

Whether the built-in chat UI overlay should be shown.

Returns:bool

On this page