コード例 #1
0
        private IEnumerator ApplyWaitForEndOfFrame()
        {
            while (true)
            {
                yield return(s_CachedWaitForEndOfFrame);

                if (m_Manager.Fibers.GetYieldCount(YieldPhase.WaitForEndOfFrame) > 0)
                {
                    m_Manager.UpdateYield(Time.deltaTime, YieldPhase.WaitForEndOfFrame);
                }
                m_Manager.MarkFrameEnd();
            }
        }
コード例 #2
0
        private IEnumerator ApplyWaitForEndOfFrame()
        {
            while (true)
            {
                yield return(s_CachedWaitForEndOfFrame);

                if (m_Manager.Fibers.GetYieldCount(YieldPhase.WaitForEndOfFrame) > 0)
                {
                    m_Manager.UpdateYield(Time.deltaTime, YieldPhase.WaitForEndOfFrame);
                }

                if (!m_LastKnownVsync)
                {
                    m_Manager.UpdateAsync(1);
                }
                m_Manager.MarkFrameEnd();

                m_LastKnownVsync = QualitySettings.vSyncCount > 0;
            }
        }