Instantly share code, notes, and snippets.

What would you like to do?
using UnityEngine;
using UnityEngine.Profiling;
public class ExampleClass : MonoBehaviour
Recorder behaviourUpdateRecorder;
void Start()
// Profilerから”BehaviourUpdate”と名前の付く項目を抽出して、
// 観測を有効化
behaviourUpdateRecorder = Recorder.Get("BehaviourUpdate");
behaviourUpdateRecorder.enabled = true;
void Update()
// BehaviourUpdateが観測可能(EditorとDevelopment Players)なら、ログに処理時間(ミリ秒)を出力
if (behaviourUpdateRecorder.isValid)
Debug.Log("BehaviourUpdate time: " + behaviourUpdateRecorder.elapsedNanoseconds);

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment