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

# 開始使用觸控

> 開始使用觸控

本文說明如何為您的 XBOX Game Streaming 作品設定觸控螢幕覆疊控制項。

您可以讓遊戲在未連接控制器的情況下也能遊玩。觸控螢幕控制項可增加遊玩您遊戲的使用者人數、提高行動裝置使用者的參與度，並為使用者提供適合其裝置的直覺體驗。

有兩種途徑可將觸控輸入帶入您的遊戲。

1. **觸控調整套件配置**。串流用戶端可以在遊戲上方覆疊觸控控制項。您可以提供自訂配置，針對您的遊戲最佳化控制項，並針對遊戲的不同部分變更為不同的配置。

2. **原生觸控**。對於遊戲中以標準觸控互動回應會比控制器互動更自然的區域，您可以直接支援觸控。常見需要此功能的範例包括功能表、物品欄管理和地圖互動。

無論是哪種形式，觸控輸入預設都不會啟用。若要在本機測試觸控，可以設定內容測試應用程式以啟用原生觸控或觸控調整套件組合側載。[串流組態概觀](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-content-test-application-stream-config.md)包含如何使用這些設定的詳細資訊。在本機觸控運作正常之後，請聯絡您的 Microsoft 客戶代表，為其他人在串流時啟用觸控輸入。

如需 CTA 的詳細資訊，請參閱 [Web 內容測試應用程式 (CTA)](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-web-content-test-application.md)。

## 觸控調整套件配置

如需使用觸控調整套件設計觸控配置之最佳做法的進階指南，請參閱[建置觸控控制項的設計人員指南](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-designers-guide.md)。

您可以使用[觸控調整套件 (TAK)](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md) 執行下列動作。

* [建立](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-building-touch-layout.md)自訂的觸控調整配置。
* 將自訂的觸控調整配置[部署](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-publishing-layouts.md)至您的裝置。
* 使用[雲端感知觸控調整套件 API](https://docs.xbox.com/zh-TW/reference/system/xgamestreaming/xgamestreaming_members.md#TouchAdaptation) 控制控制配置的顯示。

> [!NOTE]
>
> 觸控調整套件配置*只*有正在使用觸控輸入的使用者才看得到。當正在使用控制器時，觸控控制項會隱藏。因此，新增觸控調整套件配置並呼叫[雲端感知觸控調整套件 API](https://docs.xbox.com/zh-TW/reference/system/xgamestreaming/xgamestreaming_members.md#TouchAdaptation) 一律是安全且建議的做法。

您的遊戲可以有類似下列螢幕擷取畫面所示的觸控調整配置。

![2D 平台遊戲作品中觸控螢幕控制項的螢幕擷取畫面](https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-layout-platformer.png?fit=max\&auto=format\&n=UZTRJSf0emX1fheE\&q=85\&s=0b4a4aa93feac0a08ad366adad97f288)

## 支援原生觸控

支援原生觸控與在遊戲中支援滑鼠或其他輸入類似。觸控事件會以 [IGameInputReading](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md) 表示，其 [GameInputKind](https://docs.xbox.com/zh-TW/reference/input/gameinput/enums/gameinputkind.md) 的值為 `GameInputKindTouch`。

如需實作原生觸控的完整指南，請參閱[使用 IGameInput 為您的遊戲建置原生觸控介面](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-native-touch-igameinput.md)

## 參考 API 文件

* [XGameStreaming (API 內容)](https://docs.xbox.com/zh-TW/reference/system/xgamestreaming/xgamestreaming_members.md)

## 另請參閱

[XBOX Game Streaming 簡介](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-overview.md)
[建置觸控控制項的設計人員指南](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-designers-guide.md)
[使用 IGameInput 為您的遊戲建置原生觸控介面](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-native-touch-igameinput.md)
[如何取得 TAK CLI](https://aka.ms/get-takcli)


## Related topics

- [開始使用觸控組合配置](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/samples/game-streaming-touch-getting-started-with-sample-layouts.md)
- [建置觸控控制項配置](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-building-touch-layout.md)
- [命令列工具概觀 (tak.exe)](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line.md)
- [詞彙表](https://docs.xbox.com/zh-TW/publishing/game-publishing/glossary.md)
- [串流您的遊戲](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-stream-your-game.md)
