Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

Profiler.logFile

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static string logFile;

Description

Specifies the file to use when writing profiling data.

In addition to specifying a valid file path, you must set both Profiler.enabled and Profiler.enableBinaryLog to true in order to save profiling information. Specifying a new valid file path while Profiler.enableBinaryLog is true will save profiling information to that file instead. If a null or an empty path is passed Profiler.enableBinaryLog will automatically be set to false.

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; } }

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