Profiler.EndSample

public static void EndSample();

Description

Ends the current profiling sample.

The Profiler displays samples in its Hierarchy and Timeline views.

using UnityEngine;
using System.Collections;
using UnityEngine.Profiling;

public class ExampleClass : MonoBehaviour { void Example() { Profiler.BeginSample("MyPieceOfCode"); // Code to measure... Profiler.EndSample(); } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答