> ## 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.

# chat_manager::singleton_instance

> chat_manager::singleton_instance

# chat\_manager::singleton\_instance

擷取 Game Chat 2 單一執行個體的參考。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
chat_manager& singleton_instance(  
)  
```

<a id="parametersSection" />

### 參數

無。

<a id="retvalSection" />

### 傳回值

類型：[chat\_manager](/zh-TW/reference/chat/gamechat2/classes/chat_manager/chat_manager)&

Game Chat 2 單一執行個體的參考。

<a id="remarksSection" />

## 備註

此方法會傳回 Game Chat 2 單一執行個體的參考，您可以使用它在遊戲中加入 Game Chat 2 功能。[chat\_manager](/zh-TW/reference/chat/gamechat2/classes/chat_manager/chat_manager) 執行個體可用來在您的應用程式中新增語音和文字通訊，讓應用程式能夠管理本機和遠端遊戲使用者、處理來自本機和遠端 Game Chat 2 執行個體的資料，以及處理狀態變更，例如文字訊息接收和聊天轉錄。如需使用 Game Chat 2 單一執行個體的詳細資訊，請參閱[使用 Game Chat 2 C++ API](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2)。

<a id="requirementsSection" />

## 需求

**標頭：** GameChat2.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[Game Chat 2 簡介](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)\
[chat\_manager](/zh-TW/reference/chat/gamechat2/classes/chat_manager/chat_manager)


## Related topics

- [chat_manager::initialize](/zh-TW/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_initialize.md)
- [Game Chat 2 簡介](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)
- [chat_manager::cleanup](/zh-TW/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_cleanup.md)
- [chat_manager::get_chat_users](/zh-TW/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_chat_users.md)
- [chat_manager::remove_user](/zh-TW/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_remove_user.md)
