private IEnumerator AORoutine() { int index = 0; while (true) { yield return(null); if (!Singleton <QualitySettingsRunner> .Instance.HighDetails.Value) { continue; } int numUpdates = Mathf.Min(m_meshes.Count, GetAORefereshRate()); int num = 0; while (num < numUpdates) { if (index >= m_meshes.Count) { index = 0; } MeshVertexAO meshVertexAO = m_meshes[index]; meshVertexAO.UpdateAO(instant: false); num++; index++; } } }
public void Unregister(MeshVertexAO mesh) { m_meshes.Remove(mesh); }
public void Register(MeshVertexAO mesh) { m_meshes.Add(mesh); }