LoginSignup
18
13

More than 3 years have passed since last update.

プロファイラーを使ってOculus Quest実機での性能を計測する

Last updated at Posted at 2019-07-10

はじめに

Oculus Questの実機でボトルネックになってる原因を確認したいなと思ったので、手順を残しておきます。
計測されたデータの分析については書きません。
参考:最適化をする前に覚えておきたい技術

前提

自分で作成したapkをOculus Questで実行できていること

環境

・Unity 2018.3.8f1
・USBでQuestに接続

手順

1. Autoconnect Profilerにチェックを入れてビルド

計測したい対象のアプリケーションをビルドする際にDevelopment BuildとAutoconnect Profilerにチェックを入れてビルドします。
image.png

2. apkファイルをQuestにインストール

作成したapkファイルをQuestにadb installでインストールします

3. プロファイラの情報に接続するためのコマンドを実行

adb forward tcp:34999 localabstract:Unity-{insert bundle identifier here}のコマンドを実行
※1 bundle identifierはPlayer Settings → Other SettingsのPackage Nameを設定(下の図の場合com.Sample.Test)となり、adb forward tcp:34999 localabstract:Unity-com.Sample.Testのコマンドになる
image.png
※2 Build And Runでインストール、アプリ起動する場合は内部的にこのコマンドを実行してくれますが、私は普通にインストールしてこのコマンドを実行する方が好きです。

4. プロファイラウィンドウを開く

Window → Analysis → Profilerを選択し、プロファイラウィンドウを開きます
image.png

5. アプリを実行、計測する

USBを接続したままでアプリを実行します。そしてプロファイラウィンドウのEditor → AndroidPlayerを選択します。あとは計測したいタイミングでRecordのボタンを押せば計測された情報が流れてきます。
image.png
image.png

あとはプロファイラを操作してボトルネックの箇所を特定しましょう!

18
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
13