Legacy Documentation: Version 2017.2 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

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

Profiler.logFile

public static string logFile;

Description

Sets profiler output file in built players.

Use it with Profiler.enabled to produce profiling information outside of the Unity Editor.

This produces a file with framerate See Also: Profiler.enabled, Profiler.enableBinaryLog.

using UnityEngine;
using System.Collections;
using UnityEngine.Profiling;

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

Did you find this page useful? Please give it a rating: