Get(string)
Use this function to get a Recorder for the specific Profiler label.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Profiling
- Assembly: UnityEngine.CoreModule
public static Recorder Get(string samplerName)
Parameters
Sampler name.
Returns
Remarks
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); }}
Additional Resources: Sampler, Sampler.GetRecorder.