コード例 #1
0
        IEnumerator SetLODUpdater()
        {
            if (m_Updater)
            {
                yield break;
            }

            // Handle initialization or the case where the BVH has shrunk
            SceneLODUpdater updater         = null;
            var             scene           = SceneManager.GetActiveScene();
            var             rootGameObjects = scene.GetRootGameObjects();

            foreach (var go in rootGameObjects)
            {
                if (!go)
                {
                    continue;
                }

                updater = go.GetComponent <SceneLODUpdater>();
                if (updater)
                {
                    break;
                }

                yield return(null);
            }

            if (updater)
            {
                m_Updater = updater;
            }
        }
コード例 #2
0
 public void Initialize(SceneLODUpdater updater)
 {
     m_Updater   = updater;
     m_LastState = null;
 }