You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
567 B

using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class EnableDepthInForwardCamera : MonoBehaviour {
public string Message = "Add this script to generate depth if Fog Volume rendered is not used and rendering path is forward";
// Use this for initialization
void OnEnable() {
}
// Update is called once per frame
void Update()
{
if (GetComponent<Camera>().depthTextureMode != DepthTextureMode.Depth)
GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth;
}
}