public static Camera.CameraCallback onPreCull ;

描述

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

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; } }