Example #1
0
 private void SetLOD(int aLod)
 {
     this.lodSetting = aLod;
     aLod--;
     LODSwitcher[] componentsInChildren = this.scenes[this.currentScene].GetComponentsInChildren <LODSwitcher>();
     LODSwitcher[] array = componentsInChildren;
     for (int i = 0; i < array.Length; i++)
     {
         LODSwitcher lODSwitcher = array[i];
         if (aLod < 0)
         {
             lODSwitcher.ReleaseFixedLODLevel();
         }
         else
         {
             lODSwitcher.SetFixedLODLevel(aLod);
         }
     }
 }