字幕表 動画を再生する
Unity's built-in profiler
Unity のビルトイン プロファイラーは
allows us to quickly and accurately
ゲームのパフォーマンスを素早く正確に
assess the performance of our games.
把握するためのツールです
Using this information we can keep our scenes running
シーンを滑らかかつ効率的に実行するには ここに提示される
smoothly and efficiently.
情報の活用が欠かせません
In Unity we can access the profiler
Unity 上でプロファイラーにアクセスするには
by clicking Window - Profiler.
Window > Profiler の順にクリックします
Or by pressing Control-7 in Windows
また Windows ならば Ctrl + 7
or Command-7 on a Mac.
Mac では Cmd + 7 でも開けます
The profiler window functions just like every other
プロファイラーウィンドウは
Unity editor window and can be easily docked
他のウィンドウと同じように扱えるので
so that it is more readily available.
好きな領域に配置してして常時表示しておくこともできます
Once the profiler is open
プロファイラーが開いている間は
statistics will be collected about our scene
シーンが実行されるたびに統計情報が
every time it is run.
収集されます
Let's run our scene now and pause execution
ためしに Unity 上でシーンを実行して 数フレーム後に
after a few frames.
一時停止してみましょう
Now that the profiler has some data,
プロファイラーにデータが表示されましたね
we can begin examining it.
さっそく見てみましょう
The profiler window itself is split in to 3 sections.
まずプロファイラーウィンドウは 3 つのセクションに分かれています
The first is the profiler area section
ひとつめが Profiler Area セクション
where we can see the various measurements being recorded.
記録された各種データが確認できるエリアです
Next we have an overview
次が Overview セクション
where we can get a detailed breakdown
各プロファイルエリアの詳細情報を
of each profiler area.
確認できます
Finally we have the pre-object display
最後が Pre-object Display
where we can get information about the
Overview で選んだ項目の情報が
items in our overview.
表示されます
By default the profiler measures CPU usage, GPU usage,
プロファイラーはデフォルトで CPU 使用率 / GPU 使用率
rendering performance, memory usage, audio,
レンダリングのパフォーマンス / メモリ使用率 / 音声
and physics for both 3D and 2D.
物理演算 (2D / 3D 両方) を計測します
Any of these can be selected to get more information
いずれかの項目についてさらに詳細が知りたいときは
in the overview window.
その項目を選択すれば Overview ウィンドウに表示されます
To the right of the profiler area section
Profiler Area セクションの右側には
is a color chart outlining the specific performance
各エリアのパフォーマンスを示す
of different pieces of each area.
カラーチャートが表示されます
For instance, in the CPU Usage component,
たとえば CPU Usage(CPU 使用率)コンポーネントでは
we can see that rendering usage is freed
レンダリングの使用分が緑色で
whilst Script Performance is blue.
スクリプトのパフォーマンスが青色で示されています
We can switch these different sections on
各セクションの表示 / 非表示は名前横のボックスを
and off by clicking the box next to their names.
クリックすれば切り替えられます
Clicking anywhere in the color chart will give you a vertical line.
またカラーチャート上をクリックすると記録データの
The line represents a specific frame of recorded data.
特定のフレームを示す垂直線が表示され
We can see what frame we are on
現在のフレーム数や
and the total number of frames
総フレーム数が確認できます
by looking at the frame count in the upper righthand corner.
なおフレームカウントは右上に表示されます
We will also see some numbers appear around our line.
また垂直線のまわりにも数値が表示されますが
These numbers represent the amount of time
これは指定フレーム中に
in milliseconds each of the sessions took
各セッションが費やした時間を
during that specific frame.
ミリ秒で示したものです
Obviously lower numbers mean faster games.
数字が小さいほどゲームが高速で動作していることを意味します
We can see the specific information for the selected frame
また Overview セクションには指定フレームにおけるより詳細な情報が
in the overview section.
表示されます
Items in the overview section with an arrow next
Overview セクションの項目のうち左に矢印があるものは
to them can be expanded for more information.
より詳細な項目が折りたたまれていることを示します
With all of this information at your fingertips
詳細な情報をまとめて確認できるプロファイラー
you will be able to more readily determine
ゲームパフォーマンスの計測と最適化に
the performance of your games and optimise them.
ぜひ活かしてください