Version: 2022.3
언어: 한국어
public static Profiling.Recorder Get (string samplerName);

파라미터

samplerName Sampler name.

반환

Recorder Recorder object for the specified Sampler.

설명

Use this function to get a Recorder for the specific Profiler label.

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); } }