Enables the Profiler.
When enabled along with Profiler.enableBinaryLog, the Unity player saves profiling data to the file specified in the Profiler.logFile file. The player automatically assigns the file extension, “.raw” to this log file. You can load this file in the Unity Editor Profile window to view the data.
no example available in JavaScript
using UnityEngine; using System.Collections; using UnityEngine.Profiling;
public class ExampleClass : MonoBehaviour { void Start() { Profiler.logFile = "mylog"; //Also supports passing "myLog.raw" Profiler.enableBinaryLog = true; Profiler.enabled = true; } }