Profiler.EndSample 结束采样

static function EndSample () : void

Description描述

End profiling a piece of code with a custom label.

结束分析一段代码,带有一个自定义标签。

This will show up in the Profiler hierarchy.

这将显示在Profiler的层级面板。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Awake() {
		Profiler.BeginSample("MyPieceOfCode");
		Profiler.EndSample();
	}
}
Profiler.BeginSample ("MyPieceOfCode");
// do something that takes a lot of time
Profiler.EndSample ();

参见: Profiler.BeginSample

Page last updated: 2011-3-25