Clear only the depth buffer.
// Clear only the depth buffer camera.clearFlags = CameraClearFlags.Depth;
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Example() { camera.clearFlags = CameraClearFlags.Depth; } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Example() as void: camera.clearFlags = CameraClearFlags.Depth