Version: 2020.1
언어: 한국어
public static string logFile ;

설명

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.

If the buffer is too small to output the profiler data you will see a message in the debug log "Skipping profile frame. Receiver can not keep up with the amount of data sent". Use Profiler.maxUsedMemory to raise the buffer memory.

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;

// Optional, if more memory is needed for the buffer Profiler.maxUsedMemory = 256 * 1024 * 1024;

// ...

// Optional, to close the file when done Profiler.enabled = false; Profiler.logFile = "";

// To start writing to a new log file Profiler.logFile = "myOtherLog"; Profiler.enabled = true; // ... } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961