protected void Start() { if (useOnPreRender) { cameraMethods = CameraCache.Main.gameObject.EnsureComponent <CameraEventRouter>(); cameraMethods.OnCameraPreRender += OnCameraPreRender; } }
protected void OnEnable() { Initialize(); UpdateRenderers(); ToggleClippingFeature(true); if (useOnPreRender) { cameraMethods = CameraCache.Main.gameObject.EnsureComponent <CameraEventRouter>(); cameraMethods.OnCameraPreRender += OnCameraPreRender; } }
protected void OnCameraPreRender(CameraEventRouter router) { UpdateRenderers(); }