-
Book Overview & Buying
-
Table Of Contents
Unity 5 for Android Essentials
By :
The fact that developers can use the Unity profiler for profiling their own code or certain pieces of code is very important. In order to display statistics information about some of your function or for some part of your code in the Unity profiler, you just need to include your code between two calls, Profiler.BeginSample and Profiler.EndSample. After that you can use the visual Unity profiler tool to search for bottlenecks and spikes in your code.
The profiler is only available in Unity Pro. In standalone games, the profiler can dump all profiling information using Profiler.log and Profiler.enabled.
To create your own tool, you can utilize the following Unity API calls:
FindObjectsOfTypeAll
FindObjectsOfType
GetRuntimeMemorySize
GetMonoHeapSize
GetMonoUsedSize
Profiler.BeginSample
Profiler.EndSample
UnloadUnusedAssets
System.GC.GetTotalMemory
Profiler.usedHeapSize
There is the capability to export the profiling information to...
Change the font size
Change margin width
Change background colour