Documentation

Unity Engine

Download Unity

Unity Engine

Get(string)

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

Definition

Warning
Deprecated. Use Unity.Profiling.ProfilerRecorder instead.
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.