예제 #1
0
 public void Apply()
 {
     //IL_0066: Unknown result type (might be due to invalid IL or missing references)
     //IL_006b: Expected O, but got Unknown
     //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
     if (lightProbes != null)
     {
         LightmapSettings.set_lightProbes(lightProbes);
         ShaderGlobal.lightProbe = true;
     }
     else
     {
         ShaderGlobal.lightProbe = false;
     }
     if (lightmapsFar != null && lightmapsFar.Length > 0)
     {
         LightmapData[] array = (LightmapData[])new LightmapData[lightmapsFar.Length];
         int            i     = 0;
         for (int num = lightmapsFar.Length; i < num; i++)
         {
             array[i] = new LightmapData();
             array[i].set_lightmapFar(lightmapsFar[i]);
             if (i < lightmapsNear.Length)
             {
                 array[i].set_lightmapNear(lightmapsNear[i]);
             }
         }
         LightmapSettings.set_lightmapsMode(lightmapMode);
         LightmapSettings.set_lightmaps(array);
     }
 }
 public void Change()
 {
     LightmapData[] lightmapDataArray = new LightmapData[this.light.Length];
     for (int index = 0; index < lightmapDataArray.Length; ++index)
     {
         LightmapData lightmapData = new LightmapData();
         lightmapData.set_lightmapDir(this.dir[index]);
         lightmapData.set_lightmapColor(this.light[index]);
         lightmapDataArray[index] = lightmapData;
     }
     LightmapSettings.set_lightmaps(lightmapDataArray);
     LightmapSettings.set_lightProbes(this.lightProbes);
     LightmapSettings.set_lightmapsMode(this.lightmapsMode);
     if (Object.op_Inequality((Object)this.cubemap, (Object)null))
     {
         RenderSettings.set_customReflection(this.cubemap);
         RenderSettings.set_defaultReflectionMode((DefaultReflectionMode)1);
     }
     else
     {
         RenderSettings.set_defaultReflectionMode((DefaultReflectionMode)0);
     }
     if (this.fog != null)
     {
         this.fog.Change();
     }
     OutputLog.Log("LightMapChange", true, "Log");
 }
예제 #3
0
 private void OnDisable()
 {
     LightmapSettings.set_lightmaps((LightmapData[])null);
     LightmapSettings.set_lightProbes(null);
 }