Version: 2021.3
言語: 日本語
テストとデバッグ
Android のシンボル

Android デバイスでのデバッグ

Unity は、Android デバイスでアプリケーションをデバッグする方法として、以下をサポートしています。

USB デバッグ

Unity supports USB debugging for Android devices. To use USB debugging, enable developer options on your device. To do this, see Android’s Configure developer options documentation.

USB ケーブルでデバイスをコンピューターに接続します。Windows コンピューターで開発している場合は、デバイス固有の USB ドライバーのインストールが必要な場合があります。詳しくは、使用しているデバイスのメーカーのウェブサイトを参照してください。

The setup process differs for Windows and macOS. For more information on connecting your Android device to the SDK, see the Run Your App section of the Android Developer documentation.

Note: Unity doesn’t support USB debugging for Chrome OS devices. Instead, use Android Debug Bridge over wireless connection.

Android Debug Bridge

Unity supports Android Debug Bridge (ADB) over USB for Android devices and over wireless connection for Android and Chrome OS devices. Wireless connection is useful when you can’t perform USB debugging, such as when using a Chrome OS device, when a controller is plugged into the Android device, or when debugging VR applications and you insert the Android device into the VR Kit.

To set up ADB:

Android のログの閲覧

Android デバイス上でアプリケーションのビルドを実行すると、Android はスクリプトからスタックトレースや ログ などのメッセージを収集します。Android は、これらのメッセージを表示するための Logcat コマンドラインツール を提供しています。このツールを Unity アプリケーションで使用するには、次のいずれかを行ってください。

  • ADB を logcat パラメーターで起動します。
    $ adb logcat
  • Android Logcat パッケージを使用します。これは、Logcat コマンドラインツールを実装し、Unity の専用ウィンドウにアプリケーションからのメッセージを表示します。

For more information, see Android Logcat.

テストとデバッグ
Android のシンボル
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961