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

# Touch Adaptation Kit Editor: レイアウトのプレビュー

> タッチ アダプテーション レイアウトのプレビュー

この記事では、TAK Editor を使用してタッチ アダプテーション レイアウトをプレビューする方法、およびプレビューをカスタマイズするために利用できるさまざまなオプションの概要を提供します。

## 前提条件

* TAK Editor が [インストール](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor.md) および [セットアップ](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor-setup.md) されていること。
* 開いているワークスペース フォルダー内に、少なくとも 1 つの [レイアウト](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor-create-bundle.md#create-a-new-layout) を含む [バンドル](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor-create-bundle.md#create-a-new-bundle) が存在すること。

## レイアウトのプレビュー

レイアウトのプレビューは、[VS Code エクスプローラー](https://code.visualstudio.com/docs/getstarted/userinterface#_explorer) を介してエディターでレイアウト ファイルを開くだけで実行できます。バンドルの `layouts` ディレクトリ内のレイアウト ファイルをクリックするだけで、レイアウトの JSON コンテンツが 1 つのタブに表示され、レイアウトのライブ プレビューが自動的に隣のタブに表示されます。

> [!NOTE]
>
> レイアウト ファイルに **エラー** がある場合、[VS Code 問題パネル](https://code.visualstudio.com/docs/editor/editingevolved#_errors-warnings) に表示されます。エラーが解決されるまで、プレビューは更新されません。これは [ステータス、エラー、警告](#status-errors-and-warnings) のセクションで詳しく説明します。

プレビューはインタラクティブで、マウス (またはタッチ対応デバイスを使用している場合はタッチ入力) を使用してタッチ操作を操作できます。プレビューは、実際のゲーム ストリームでレンダリングされているかのように、入力に応答します。

レイアウト JSON ファイルへの変更は、ファイルを保存するとプレビューに反映されます。これにより、レイアウトに変更を加えて結果をすぐに確認できる、迅速で反復的なデザイン プロセスが可能になります。

![Screenshot of the TAK Editor layout preview](https://mintcdn.com/microsoft-4404708b/CwRBzaXvHw9zaPoe/images/gdk/features/common/tak-editor-layout-preview.png?fit=max\&auto=format\&n=CwRBzaXvHw9zaPoe\&q=85\&s=82bf7f431dfcc78bc2025f48f452d390)

プレビュー タブが閉じられた場合、次の 2 つの方法のいずれかで再度開くことができます:

1. レイアウト ファイルの右上隅にある「Open Preview」ボタンをクリックします:

   ![Screenshot of the Open Preview button in the layout file](https://mintcdn.com/microsoft-4404708b/CwRBzaXvHw9zaPoe/images/gdk/features/common/tak-editor-open-preview-button.png?fit=max\&auto=format\&n=CwRBzaXvHw9zaPoe\&q=85\&s=ad412fcbde407bcd41a74b1b5dd9dacb)
2. コマンド パレットを介して「Touch Adaptation Kit: Open preview to the side」コマンドを実行します。

   ![Screenshot of the command palette with the open preview command selected](https://mintcdn.com/microsoft-4404708b/CwRBzaXvHw9zaPoe/images/gdk/features/common/tak-editor-open-preview-command.png?fit=max\&auto=format\&n=CwRBzaXvHw9zaPoe\&q=85\&s=824a54945397598058a9cee1ab83f0e0)

コマンドとボタンは、(1) レイアウト ファイルが開かれており、(2) プレビューがまだ開かれていない場合にのみ利用可能であることに注意してください。

## ステータス、エラー、警告

### 検証ステータス

バンドル内のレイアウト、アセット、およびその他のファイルに変更が加えられると、拡張機能は、すべてのバンドルが遵守すべき事前定義されたルールのセットに対して、バンドルの内容の有効性を継続的に検証します。これはバックグラウンドで行われ、バンドル内にネストされたファイルが保存または他の方法で変更 (例: 名前変更) されるたびに再評価されます。

この検証のステータスは、ウィンドウの右下端にあるステータス バー項目を通じて報告されます。

![Screenshot of the verification status bar item indicating OK status](https://mintcdn.com/microsoft-4404708b/CwRBzaXvHw9zaPoe/images/gdk/features/common/tak-editor-verification-status-bar-item.png?fit=max\&auto=format\&n=CwRBzaXvHw9zaPoe\&q=85\&s=5a912a5bf0e751188fc613b39b8d4229)

このステータス バー項目は、少なくとも 1 つのレイアウト ファイルがエディターで開かれている場合にのみ表示されます。アクティブなバンドルの名前と、バンドル内で見つかった問題 (エラーおよび警告) の数を表示します。ステータス バー項目をクリックすると、バンドル内で見つかったすべての問題のリストを含む [VS Code 問題パネル](https://code.visualstudio.com/docs/editor/editingevolved#_errors-warnings) が開きます。

### 同期ステータス

プレビュー パネルには、TAK CLI へのアクティブなバンドル サイドロード接続があります。これがどのように機能するかについては、[TAK CLI のドキュメント](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command.md) を参照してください。

この接続のステータスは、検証ステータス バー項目の隣にあるウィンドウの右下端にあるステータス バー項目を通じて報告されます。このステータスは、プレビュー パネルが開いているときにのみ表示されます。

![Screenshot of the synchronization status bar item indicating OK status](https://mintcdn.com/microsoft-4404708b/CwRBzaXvHw9zaPoe/images/gdk/features/common/tak-editor-sync-status-bar-item-ok.png?fit=max\&auto=format\&n=CwRBzaXvHw9zaPoe\&q=85\&s=7cffca199222d55bce8955221b158812)

上記のスクリーンショットは、接続がアクティブでプレビューが同期しているときのステータス バー項目を示しています。これは、バンドルにエラーがない場合に該当します (警告は許容され、状態を「同期中」に保ちます)。エラーが存在する場合、ステータスは「Out of sync」に変わります。

このステータス バー項目にカーソルを合わせると、TAK CLI がホストするサイドロード サーバーの詳細を含むツールチップが表示されます。このアドレスは、[Content Test App](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-deploying-touch-layout.md) など、別のゲーム ストリーミング クライアントをプレビューに接続するために使用できます。

### エラーと警告

[VS Code 問題パネル](https://code.visualstudio.com/docs/editor/editingevolved#_errors-warnings) には、バンドル内で見つかったすべての問題のリストが表示されます。これには、検証プロセス中に見つかったすべての問題が含まれます。

問題が存在するとき、検証または同期のステータス バー項目のいずれかをクリックすると、問題パネルが開き、問題のリストが表示されます。各問題には、説明とバンドル内の問題が見つかった場所があります。

たとえば、以下のスクリーンショットでは、バンドル内の `platformer-advanced.json` レイアウト ファイルがバンドルに存在しないアセット (`run.png`) を参照している 1 つのエラーが存在します:

![Screenshot of the Problems Panel with an error in the bundle](https://mintcdn.com/microsoft-4404708b/CwRBzaXvHw9zaPoe/images/gdk/features/common/tak-editor-preview-errors-warnings.png?fit=max\&auto=format\&n=CwRBzaXvHw9zaPoe\&q=85\&s=129c8ee737439aac6211f3d8a564ffe9)

参照がバンドル内に存在するアセットに変更されるか、アセットがバンドルに追加されるまで、プレビューの状態は「Out of sync」になります。

## 次のステップ

> \[!div class="nextstepaction"]
> [プレビューのカスタマイズ](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor-customize-preview.md)


## Related topics

- [Touch Adaptation Kit Editor: バンドルとレイアウトの作成](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor-create-bundle.md)
- [Touch Adaptation Kit Editor: プレビューのカスタマイズ](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor-customize-preview.md)
- [Visual Studio Code 向け Touch Adaptation Kit (TAK) エディター](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/index.md)
- [Visual Studio Code 向け Touch Adaptation Kit Editor 拡張機能](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-editor/game-streaming-tak-editor.md)
- [タッチレイアウトの公開](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-publishing-layouts.md)
