Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Diagnostics;
- public class NewBehaviourScript : MonoBehaviour
- {
- private Stopwatch sw;
- private void Start()
- {
- sw = new Stopwatch();
- sw.Start();
- UnityEngine.Debug.Log($"[{Time.frameCount}] Start: {sw.ElapsedMilliseconds}");
- InvokeRepeating("Repeater", 0.0001f, 0.005f);
- }
- private void Repeater()
- {
- UnityEngine.Debug.Log($"[{Time.frameCount}] Repeater: {sw.ElapsedMilliseconds}");
- }
- private void Update()
- {
- UnityEngine.Debug.Log($"[{Time.frameCount}] Update: {sw.ElapsedMilliseconds}");
- }
- private void LateUpdate()
- {
- UnityEngine.Debug.Log($"[{Time.frameCount}] LateUpdate: {sw.ElapsedMilliseconds}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement