コード例 #1
0
 private static void AddGo()
 {
     if (CpuStatistic.Instance == null)
     {
         GameObject gameObject = new GameObject("CpuStatistic");
         CpuStatistic.Instance = gameObject.AddComponent <CpuStatistic>();
     }
 }
コード例 #2
0
 private void Awake()
 {
     CpuStatistic.Instance = this;
     for (int i = 0; i < 9; i++)
     {
         CpuStatistic.arr[i] = new CpuStatisticInfo();
         CpuStatistic.arr[i].statisticName = (CpuStatisticType)i + ":";
     }
 }
コード例 #3
0
 public static void SampleBegin(CpuStatisticType type)
 {
     CpuStatistic.AddGo();
     CpuStatistic.arr[(int)type]._sampleBeginTime = DateTime.Now.Ticks;
 }