public void AdjustBrightness(float val, AdjustLightmap options) { if (last + val > Min && last + val < Max) { if (this.gameObject.isStatic && this.GetComponent <Renderer>() != null) { if (options == AdjustLightmap.Both) { SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, val); SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, val); } else if (options == AdjustLightmap.Far) { SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, val); } else if (options == AdjustLightmap.Near) { SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, val); } } // last += level; } else { IsExecuting = false; } }
public void AdjustBrightnessCurve(AdjustLightmap options) { if (this.gameObject.isStatic && this.GetComponent <Renderer>() != null) { if (options == AdjustLightmap.Both) { SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, currentCurveVal); SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, currentCurveVal); } else if (options == AdjustLightmap.Far) { SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, currentCurveVal); } else if (options == AdjustLightmap.Near) { SetBrightness(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, currentCurveVal); } } // last += level; }