Мои Уведомления
Привет, !
Мой Аккаунт Мои Финансы Мои Подписки Мои Настройки Выход
Руководство API скрипты

ProfilerMarker Constructor

Объявление

public ProfilerMarker(string name);

public ProfilerMarker(Unity.Profiling.ProfilerCategory category, string name);

public ProfilerMarker(Unity.Profiling.ProfilerCategory category, char* name, int nameLen);

public ProfilerMarker(Unity.Profiling.ProfilerCategory category, string name, Unity.Profiling.LowLevel.MarkerFlags flags);

public ProfilerMarker(Unity.Profiling.ProfilerCategory category, char* name, int nameLen, Unity.Profiling.LowLevel.MarkerFlags flags);

public ProfilerMarker(char* name, int nameLen);

Параметры

name Имя маркера.
category Категория профайлера.
nameLen Длина имени маркера.
flags Флаги маркера.

Описание

Создает новый маркер производительности для инструментирования кода.

Используйте ProfilerMarker, чтобы разметить фрагмент кода для Profiler и Recorder.

using Unity.Profiling; public class MySystemClass { static readonly ProfilerMarker s_PreparePerfMarker = new ProfilerMarker("MySystem.Prepare"); static readonly ProfilerMarker s_SimulatePerfMarker = new ProfilerMarker(ProfilerCategory.Ai, "MySystem.Simulate"); public void UpdateLogic() { s_PreparePerfMarker.Begin(); // ... s_PreparePerfMarker.End(); using (s_SimulatePerfMarker.Auto()) { // ... } } }
Вы можете отблагодарить автора, за перевод документации на русский язык. ₽ Спасибо
API скрипты 2021.3