diff --git a/NewHorizons/Components/RingOpacityController.cs b/NewHorizons/Components/RingOpacityController.cs index 0f762506..913230c4 100644 --- a/NewHorizons/Components/RingOpacityController.cs +++ b/NewHorizons/Components/RingOpacityController.cs @@ -25,10 +25,22 @@ namespace NewHorizons.Components CurrentOpacity = 1; } - if (_ringFluidVolume != null) + if (_ringFluidVolume != null && _ringFluidVolume.gameObject.activeInHierarchy) { - if (Mathf.Approximately(CurrentOpacity, 0) && _ringFluidVolume.IsVolumeActive()) _ringFluidVolume.SetVolumeActivation(false); - else if (!_ringFluidVolume.IsVolumeActive()) _ringFluidVolume.SetVolumeActivation(true); + if (Mathf.Approximately(CurrentOpacity, 0)) + { + if (_ringFluidVolume.IsVolumeActive()) + { + _ringFluidVolume.SetVolumeActivation(false); + } + } + else + { + if (!_ringFluidVolume.IsVolumeActive()) + { + _ringFluidVolume.SetVolumeActivation(true); + } + } } if (_meshRenderer == null) return;