Profiling.Profiler.EndSample

Unity · Версия 2020.3 LTS · Scripting · Profiler

Profiling.Profiler.EndSample

Объявление

public static void EndSample();

Описание

Завершает текущий пример профилирования.

Профилировщик отображает образцы в представлении "Иерархия" и "Временная шкала".

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

public class ExampleClass : MonoBehaviour
{
    void Example()
    {
        Profiler.BeginSample("MyPieceOfCode");
        // Code to measure...
        Profiler.EndSample();
    }
}

Смотрите так же: Profiler.BeginSample, Profiler.

Обновлено 17 ноября 2026 г.