Version: 2020.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); } }

関連項目: Sampler, Sampler.GetRecorder.