Version: 2017.1

Profiler

class in UnityEngine.Profiling

マニュアルに切り替える

説明

スクリプトから Profiler を扱います。

Profiler.BeginSample や Profiler.EndSample により自身のスクリプトにカスタムの Profiler セクションを追加できます。

スタンドアロンゲームでは、Profiler.logFile や Profiler.enabled を使用して、Profiler はすべてのプロファイリング情報をダンプできます。

Static 変数

enableBinaryLogビルドしたプレーヤーでプロファイラー出力ファイルを設定します
enabledプロファイラーの有効/無効を設定します
logFileビルドしたプレーヤーでプロファイラー出力ファイルを設定します
usedHeapSizeLongReturns the number of bytes that Unity has allocated. This does not include bytes allocated by external libraries or drivers.

Static 関数

AddFramesFromFileログデータをプロファイラーに表示します
BeginSampleカスタムラベルの付いたコードの一部のプロファイリングを開始します
EndSampleカスタムラベルの付いたコードの一部のプロファイリングを終了します
GetMonoHeapSizeLongReturns the size of the reserved space for managed-memory.
GetMonoUsedSizeLongThe allocated managed-memory for live objects and non-collected objects.
GetRuntimeMemorySizeLongGathers the native-memory used by a Unity object.
GetTempAllocatorSizeReturns the size of the temp allocator.
GetTotalAllocatedMemoryLongThe total memory allocated by the internal allocators in Unity. Unity reserves large pools of memory from the system. This function returns the amount of used memory in those pools.
GetTotalReservedMemoryLongThe total memory Unity has reserved.
GetTotalUnusedReservedMemoryLongUnity allocates memory in pools for usage when unity needs to allocate memory. This function returns the amount of unused memory in these pools.
SetTempAllocatorRequestedSizeSets the size of the temp allocator.