> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OnChatMessageReceived

> Party Unity SDK 中 PlayFabMultiplayerManager 上 OnChatMessageReceived 事件的参考，当本地玩家收到聊天消息时触发。

在收到聊天消息时发生。

## 参数

### sender (object)

引发该事件的类。

### from (PlayFabPlayer)

发送该消息的玩家。

### message (string)

消息的内容。

### type (ChatMessageType)

指定消息类型的参数。


## Related topics

- [PlayFabMultiplayerManager 类](/zh-CN/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/index.md)
- [Party Unity 插件快速入门](/zh-CN/services/playfab/multiplayer/networking/party-unity-plugin-quickstart.md)
- [game_chat_text_chat_received_state_change](/zh-CN/reference/chat/gamechat2/structs/game_chat_text_chat_received_state_change.md)
- [game_chat_transcribed_chat_received_state_change](/zh-CN/reference/chat/gamechat2/structs/game_chat_transcribed_chat_received_state_change.md)
- [PartyChatTextReceivedOptions](/zh-CN/services/playfab/multiplayer/networking/reference/enums/partychattextreceivedoptions.md)
