Esempio n. 1
0
    void Update()
    {
        ++frameCount;
        float time = Time.realtimeSinceStartup - prevTime;

        // 変更頻度
        if (time >= 0.25f)
        {
            if (UseFpsToDebugLog)
            {
                (frameCount / time + "fps").Log();
            }

            DebugText.UpdateInfo("FPS", (frameCount / time + "fps"));

            //フレームカウントを戻して秒数を更新
            frameCount = 0;
            prevTime   = Time.realtimeSinceStartup;
        }
    }