用户工具

站点工具


侧边栏

script:unityengine:classes:profiler:profiler.enablebinarylog

Profiler.enableBinaryLog 启用二进制日志

JavaScript ⇒ public static var enableBinaryLog: bool;
C# ⇒ public static bool enableBinaryLog;

Description 描述

Sets profiler output file in built players.

创建的玩家中设置分析器输出目录。

If binary log is enabled, a file is generated named “<logfile>.data” which holds binary data for the profile This becomes a large file, so only enable it for a few frames on webplayers the file is placed next to the log file See Also: Profiler.enableBinaryLog.

如果启用二进制日志,生成名称为“<logfile>.data”的文件,该文件保留了分析器中的二进制数据,这是个大文件。因此,仅在网页播放器上启用几帧,该文件放置与日志文件下请参考:Profiler.enableBinaryLog。

JavaScript:

	function Start () {
		Profiler.logFile = "mylog.log";
		Profiler.enableBinaryLog = true; // writes to "mylog.log.data"
		Profiler.enabled = true;
	}

C#:

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

profiler

script/unityengine/classes/profiler/profiler.enablebinarylog.txt · 最后更改: 2016/08/02 05:37 (外部编辑)