Version: 2021.2
public static float fogDensity ;

描述

指数雾效的强度。

ExponentialExponentialSquared 模式会使用雾效强度。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { // Set the fog color to be blue RenderSettings.fogDensity = 0.1f;

// And enable fog RenderSettings.fog = true; } }

另请参阅:RenderSettings.fogMode