under water fog

hi every one

I’m new to programming and I need a script (if possible) so that when an object the character is touching an object/water it enables the fog and when its not disables the fog.

ScriptReference is your friend

just add this line to any script and add to any object in your project

// Enable fog
RenderSettings.fog = true;

you can also access manually to the Edit/Render Settings menu. Just inspect the inspector :slight_smile:

Hi Guy,
There is something insteresting for you here:
http://answers.unity3d.com/questions/38653/breathing-underwater.html

And as Josmun said “ScriptReference is your friend”