22 lines
308 B
C#
22 lines
308 B
C#
using UnityEngine;
|
|
|
|
public class DisableFog : MonoBehaviour
|
|
{
|
|
private bool previousFogState;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void OnPreRender()
|
|
{
|
|
previousFogState = RenderSettings.fog;
|
|
RenderSettings.fog = false;
|
|
}
|
|
|
|
private void OnPostRender()
|
|
{
|
|
RenderSettings.fog = previousFogState;
|
|
}
|
|
}
|