用户工具

站点工具


侧边栏

script:unityengine:classes:profiler:profiler.endsample

Profiler.EndSample 结束采样

JavaScript ⇒ public static function EndSample(): void;
C# ⇒ public static void EndSample();

Description 描述

End profiling a piece of code with a custom label.

结束分析带有自定义标签的代码。

This will show up in the Profiler hierarchy.

这将会显示在分析器层级中。

JavaScript:

	Profiler.BeginSample ("MyPieceOfCode");
	// do something that takes a lot of time
	Profiler.EndSample ();

C#:

using UnityEngine;
using System.Collections;
 
public class ExampleClass : MonoBehaviour {
    void Example() {
        Profiler.BeginSample("MyPieceOfCode");
        Profiler.EndSample();
    }
}

profiler

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