private void OnDisable() { if (_camViewpoint != null) { PreparedReflections.Remove(_camViewpoint.GetHashCode()); } // Cleanup all the objects we possibly have created if (_reflectionTexture) { Destroy(_reflectionTexture); _reflectionTexture = null; } if (_camReflections) { Destroy(_camReflections.gameObject); _camReflections = null; } }
private void OnDisable() { if (_camViewpoint != null) { PreparedReflections.Remove(_camViewpoint.GetHashCode()); } // Cleanup all the objects we possibly have created if (_reflectionTexture) { Destroy(_reflectionTexture); _reflectionTexture = null; } if (_camReflections) { Destroy(_camReflections.gameObject); _camReflections = null; } WeatherMakerCommandBufferManagerScript.Instance.UnregisterPreCull(this); }
private void OnDisable() { if (_camViewpoint != null) { PreparedReflections.Remove(_camViewpoint.GetHashCode()); } // Cleanup all the objects we possibly have created if (_reflectionTexture) { Destroy(_reflectionTexture); _reflectionTexture = null; } if (_camReflections) { Destroy(_camReflections.gameObject); _camReflections = null; } RenderPipelineManager.beginCameraRendering -= BeginCameraRendering; }