Thanks to visit codestin.com
Credit goes to github.com

Skip to content

UnityでAndroid GPU Inspectorを使用する為のAndroidManifest.xmlのSample

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

katsumasa/AndroidGPUInspectorForUnity

Repository files navigation

AndroidGPUInspectorForUnity

概要

UnityでビルドしたバイナリでAndroid GPU Inspectorを使用する為にビルド時にAndroidManifest.xmlを書き換えます。

インストール

git clone https://github.com/katsumasa/AndroidManifestReflection.git
git clone https://github.com/katsumasa/AndroidGPUInspectorForUnity.git

使い方

image

  1. PlatformをAndroidへ切り替える
  2. Development Buildにチェックを入れる
  3. Buildを実行する

以上

NOTE

  • Development Buildにチェックを入れない場合でもProfilingを行うことは可能ですが、Profiling可能な情報が制限されます。
  • Android GPU Inspectorが実行された状態でビルドを実行すると次のエラーが発生します。ビルドを行う場合は必ずAndroid GPU Inspectorを終了させておいて下さい。
CommandWithNoStdoutInvokationFailure: Unable to start ADB server. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.

AndroidManifest.xmlの書き換え

Android GPU Inspectorでプロファイリングを行う為に、ビルド時に出力されるAndroidManifest.xmlに下記の要素を追加します

<application [...] android:debuggable="true">
 <meta-data android:name="com.android.graphics.developerdriver.enable" android:value="true" />

Android GPU Inspectorの使い方

Android GPU Inspectorはこちらから取得してください。

  1. Create a new traceを選択 image
  2. Device and Typeで対応デバイスを選択 CaptureSystemProfile
  3. ApplicationからビルドしたアプリケーションのUnityPlayerActivityを選択
  4. OutputでOutput Directorを指定.
  5. Profilingを開始したいタイミングで、Startを押す。

NOTE

Durationで設定した時間Profilingを行った後、自動的にProfiling結果が表示されます。

Capturing

Android GPU Inspectorのキーアサイン

GPU Inspector

W,S: Zoom In/Out
A,D: 左右へのスクロール

About

UnityでAndroid GPU Inspectorを使用する為のAndroidManifest.xmlのSample

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages