OnPostRender is called after a camera has finished rendering the scene.
This message is sent to all scripts attached to the camera.
See Also: onPostRender delegate.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { private bool revertFogState = false; void OnPreRender() { revertFogState = RenderSettings.fog; RenderSettings.fog = enabled; } void OnPostRender() { RenderSettings.fog = revertFogState; } }