Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

RenderSettings.fogDensity

public static float fogDensity;

Description

The density of the exponential fog.

Fog density is used by Exponential and ExponentialSquared modes.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { RenderSettings.fogDensity = 0.1F; RenderSettings.fog = true; } }

See Also: RenderSettings.fogMode.