using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameLoop : MonoBehaviour { static GameLoop m_GameLoop; static public GameLoop instance { get { return m_GameLoop; } } int m_IndexOfUpdate = 0; public int indexOfUpdate { get { return m_IndexOfUpdate; } } private void Awake() { m_GameLoop = this; } private void Update() { ++m_IndexOfUpdate; } }