1234567891011121314151617181920212223242526272829303132 |
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public class FrameRateUtility : MonoBehaviour
- {
- #region Variable
- public static int FrameRate;
- private int Counter;
- private float Timer;
-
- #endregion
- public void Update()
- {
- Timer += Time.deltaTime;
- if (Timer >= 1)
- {
- Timer = 0;
- FrameRate = Counter;
- }
- else
- {
- Counter++;
- }
- }
- }
|