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"); }
public static void UpdateLightmap(int sceneId) { string text = null; Scene scene = DataReader <Scene> .Get(sceneId); if (scene == null) { return; } if (!string.IsNullOrEmpty(scene.lightmap)) { text = scene.lightmap; } else { string[] array = scene.path.Split(new char[] { '/' }); if (array.Length > 0) { text = array[array.Length - 1]; } } if (string.IsNullOrEmpty(text)) { return; } string pathOfPrefab = FileSystem.GetPathOfPrefab(text); if (string.IsNullOrEmpty(pathOfPrefab)) { return; } GameObject gameObject = AssetManager.AssetOfNoPool.LoadAssetNowNoAB(pathOfPrefab, typeof(Object)) as GameObject; if (gameObject != null) { PrefabLightmap component = gameObject.GetComponent <PrefabLightmap>(); if (component == null) { return; } LightmapData[] array2 = new LightmapData[component.lightmap_far.get_Count()]; for (int i = 0; i < array2.Length; i++) { array2[i] = new LightmapData(); array2[i].set_lightmapFar(component.lightmap_far.get_Item(i)); } LightmapSettings.set_lightmaps(array2); LightmapSettings.set_lightmapsMode(0); } }
private void OnDisable() { LightmapSettings.set_lightmaps((LightmapData[])null); LightmapSettings.set_lightProbes(null); }