---
tags:
    - "Environment, Fog, Ambient, Lighting, Skybox"
---

# Render Settings Fog Density

[Rendering](../index.md) / [Render Settings](index.md) / **Render Settings Fog Density**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Fog Density static property of the Render Settings class

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    [Set]

    [Title("Render Settings Fog Density")]
    [Category("Rendering/Render Settings/Fog Density")]
    [Description("The Fog Density static property of the Render Settings class")]

    [Image(typeof(IconPicture), ColorTheme.Type.TextLight, typeof(BadgeSettings))]
    [Keywords("Environment, Fog, Ambient, Lighting, Skybox")]

    [Serializable]
    public class GenTypeNumber_RenderSettings_FogDensity : TypeNumber
    {

        public override double GetPreview(GameObject source)
        {
            return RenderSettings.fogDensity;
        }

        public override double Get(Args args)
        {
            return RenderSettings.fogDensity;
        }

        public override void Set(double value, Args args)
        {
            RenderSettings.fogDensity = (float) value;
        }

        public override string ToString()
        {
            return $"Render Settings Fog Density";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

