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

# 构建触控布局

> 构建触控布局

构建触控布局包括创建一个[触控适配包](/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-bundle)，其中包括：

* 一个 `takxconfig.json` 文件，它是该包所有元数据和属性的 JSON 表示
* 一组布局，其中每个布局文件是游戏中特定场景下玩家可用控件的 JSON 表示
* 一个上下文文件，是布局所使用的全局状态和属性的 JSON 表示
* 那些布局引用的任何自定义资产

## 入门

创建[触控适配包](/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-bundle)最简单的方法是使用[创建命令](/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-create-command)。此命令可用于轻松创建所需的所有文件和文件夹，以启动和运行触控适配套件。除了能够创建完整的包之外，创建命令还可以用于基于游戏中不同类型和情境的模板布局创建单个布局文件。

## 触控包 JSON 架构

各种 JSON 文件（如布局或上下文文件）使用 JSON 架构文件来提供关于如何编写有效文件的结构和规则。这些架构文件托管在 [XBOX Game Streaming Tools Github](https://github.com/microsoft/xbox-game-streaming-tools/tree/main/touch-adaptation-kit/schemas) 上，有多种语言。这些特定语言的架构可以在 [Visual Studio Code](https://code.visualstudio.com/download) 等工具中使用，以获取该语言中关于架构属性和问题的 Intellisense。要使用架构文件的本地化版本，只需将文件中的 `$schema` 属性设置为指向本地化版本。例如，以下示例 JSON 和图像显示了上下文文件中 `state` 属性的日语帮助文本。

```JSON theme={null}
//Example context file
{
  "$schema": "https://raw.githubusercontent.com/microsoft/xbox-game-streaming-tools/main/touch-adaptation-kit/schemas/ja-JP/context/v4.0/context.json",

  "state": {
    "enableReload": false
  }
}
```

<img src="https://mintcdn.com/microsoft-4404708b/UZTRJSf0emX1fheE/images/gdk/features/common/game-streaming-tak-vscode-intellisense.png?fit=max&auto=format&n=UZTRJSf0emX1fheE&q=85&s=fd518d059cf0dba1260bddf95bc71960" alt="Visual Studio Code Intellisense 日语截图" width="1276" height="480" data-path="images/gdk/features/common/game-streaming-tak-vscode-intellisense.png" />


## Related topics

- [为 XBOX 游戏串流构建触控布局](/zh-CN/build/core-features/common/game-streaming/building-touch-layouts/index.md)
- [部署触控布局](/zh-CN/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-deploying-touch-layout.md)
- [XBOX Cloud Gaming 触控与流式传输支持](/zh-CN/build/core-features/common/game-streaming/index.md)
- [Touch Adaptation Kit (TAK) 命令行工具参考](/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/index.md)
- [适用于 Visual Studio Code 的 Touch Adaptation Kit (TAK) 编辑器](/zh-CN/build/core-features/common/game-streaming/tak-editor/index.md)
