using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraDepthEnable : MonoBehaviour { private void Start() { var currentCamera = GetComponent(); if (currentCamera != null) currentCamera.depthTextureMode = DepthTextureMode.Depth; } }