public override bool PEGI() { bool changed = base.PEGI(); changed |= lights.Nested_Inspect(); if (ImageData != null && ImageData.texture2D != null) { bool recalc = false; if ("Recalculate ".Click().nl()) { recalc = true; recalculatePrecise = false; } if ("Recalculate Precise".Click().nl()) { recalc = true; recalculatePrecise = true; } if (recalc) { changed = true; RecalculateVolume(transform.position); VolumeToTexture(); } } if (changed) { UpdateMaterials(); } return(changed); }
public override bool PEGI() { bool changed = base.PEGI(); changed |= lights.Nested_Inspect(); if (changed && MaterialLightManager.probeChanged != -1) { lightSourceDirty[MaterialLightManager.probeChanged] = true; } if (ImageData != null && ImageData.texture2D != null) { if (!VolumeJobIsRunning) { "Channel: ".edit(ref rayJobChannel, 0, 2).nl(); if ("Recalculate ".Click()) { changed = true; VolumeFromTexture(); lightSourceDirty[rayJobChannel] = true; rayStep = RaycastsStep.Requested; } if ("All".Click().nl()) { changed = true; VolumeFromTexture(); for (int i = 0; i < 3; i++) { lightSourceDirty[i] = true; } } } else { "Recalculating channel {0} : {1}".F(rayJobChannel, rayStep.ToString()).write(); if (icon.Close.Click("Stop Recalculations").nl()) { CompleteAndDisposeAll(); } } } else { if (ImageData == null) { "Image Data is Null".nl(); } else { "Texture 2D is null".nl(); } } if (changed) { UpdateMaterials(); } return(changed); }