Recorder.Get
Declaration
public static Profiling.Recorder Get(string samplerName);Параметры
| Параметр | Описание |
|---|---|
| samplerName | Имя пробоотборника. |
Возвращаемое значение
Записывающий аппарат Recorder объект для указанного Sampler.
Описание
Используйте эту функцию для получения Recorder для конкретной метки Profiler.
using UnityEngine; using UnityEngine.Profiling;
public class ExampleClass : MonoBehaviour { Recorder behaviourUpdateRecorder; void Start() { behaviourUpdateRecorder = Recorder.Get("BehaviourUpdate"); behaviourUpdateRecorder.enabled = true; }
void Update() { if (behaviourUpdateRecorder.isValid) Debug.Log("BehaviourUpdate time: " + behaviourUpdateRecorder.elapsedNanoseconds); } }
Дополнительные ресурсы: ,Sampler,, ,Sampler.GetRecorder,.