- Home /
Refer to light in Unity C sharp script
Hello, so basically, I have made a settings page for my game and I really want to add an option to turn off fog. How would i be able to pull this off? The fog I want to turn off is in another scene. Please reply to this if you are interested in helping out, thanks. (BTW, i am new to unity so please forgive me for my lack of understanding :) )
Answer by MickyX · May 22 at 11:03 AM
Just call RenderSettings.fog = false; to turn the fog off.
In your case, in your settings save a bool for fog on or off
When your scene starts check the settings for the fog set accordingly with either
RenderSettings.fog = true;
or
RenderSettings.fog = false;
@MickyX Thank you so so much. You are such a life-saver!
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
Flip over an object (smooth transition) 3 Answers