Exemple #1
0
        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;
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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;
        }