Version: 2017.3
public static Camera.CameraCallback onPreCull ;

描述

任意摄像机开始剔除前触发的事件。

另请参阅:CameraCallbackonPreRenderonPostRender

using UnityEngine;
public class ExampleClass : MonoBehaviour
{
    // callback to be called before any culling
    public void MyPreCull(Camera cam)
    {
        Debug.Log("PreCull: " + cam.gameObject.name);
    }

public void OnEnable() { // register the callback when enabling object Camera.onPreCull += MyPreCull; }

public void OnDisable() { // remove the callback when disabling object Camera.onPreCull -= MyPreCull; } }