Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Profiler.enabled

Switch to Manual
public static bool enabled;

Description

Enables the Profiler.

Can be used with Profiler.logFile to log profiling information in built players. See Also: Profiler.logFile.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { Profiler.logFile = "mylog.log"; Profiler.enabled = true; } }