JJBB/Assets/Project/Script/CameraDepthEnable.cs
2024-08-23 15:49:34 +08:00

13 lines
327 B
C#

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