Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Get(string)

Use this function to get a Recorder for the specific Profiler label.
Read time 1 minuteLast updated 7 days ago

Definition

public static Recorder Get(string samplerName)

Parameters

samplerName

Sampler name.

Returns

Type

Description

RecorderRecorder object for the specified Sampler.

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.