TextChatMessage

顯示已棄用項目

*此內容很快就會推出您所選的語言版本。

無法建立

Immutable data object representing a text chat message.

To learn more about using TextChatMessages, see In-Experience Text Chat.

概要

屬性

屬性

BubbleChatMessageProperties

平行讀取

ChatWindowMessageProperties

平行讀取

MessageId

平行讀取

A unique identifier for the TextChatMessage.

Metadata

平行讀取

A general purpose field for storing miscellaneous data about the TextChatMessage. The second argument of TextChannel:SendAsync() and TextChannel:DisplaySystemMessage() is used to populate this field.

If TextChatService.CreateDefaultTextChannels is true, default system messages sent to the system channel have unique TextChatMessage.Metadata values.

Use this field to apply additional formatting for special messages within TextChatService.OnIncomingMessage and TextChannel.OnIncomingMessage callbacks.

PrefixText

平行讀取

A prefix to add to a user's message. This supports Rich Text, so developers can set custom properties for this text to support chat tags.

By default, TextChatMessage.PrefixText is the name of the TextSource, which is the Player.DisplayName of the user associated with the TextSource via TextSource.UserId.

平行讀取

Indicates the status of the TextChatMessage.

Text

平行讀取

The filtered text message for the user. Different users may receive different strings from this property based on filtering rules. It can be an empty string.

TextChannel

平行讀取

A reference to the origin TextChannel.

TextSource

平行讀取

A reference to the origin TextSource.

Timestamp

平行讀取

A timestamp of when the message was originally sent.

Translation

平行讀取

Represents translated and filtered text messages based on users' localization settings. The system doesn't translate messages between users with the same localization settings or using languages without the text filter support, so this property can be an empty string if no translation happens. For customization, see Customizing Translated Messages.

方法

活動