private void OnDisable()
        {
            renderers = null;
            unlitPass?.UpdateRenderers(null);

            activeInstance.resources?.ReleaseAll();
            activeInstance.resources = null;

            activeInstance = null;
        }
        private void OnEnable()
        {
            if (activeInstance != null)
            {
                throw new Exception($"Multiple instances of {nameof(PointCloudManager)} seem to be active - this is invalid.");
            }

            activeInstance = this;

            VerifyPassVolume();
        }
Esempio n. 3
0
        private void OnEnable()
        {
            if (activeInstance != null)
            {
                throw new Exception($"Multiple instances of {nameof(PointCloudManager)} seem to be active - this is invalid.");
            }

            activeInstance = this;

            InitializeCustomPassVolumes();
            RefreshRenderers();
        }
Esempio n. 4
0
        private void OnDisable()
        {
            renderers = null;

            var customPassVolume = gameObject.GetComponent <CustomPassVolume>();

            if (customPassVolume != null && customPassVolume.customPasses.Count == 1 &&
                customPassVolume.customPasses[0] is PointCloudRenderPass pass)
            {
                pass.UpdateRenderers(null);
            }

            activeInstance.resources?.ReleaseAll();
            activeInstance.resources = null;

            activeInstance = null;
        }
Esempio n. 5
0
        private void OnDisable()
        {
            activeInstance = null;

            if (renderers != null && renderers.Length > 0)
            {
                foreach (var pcr in renderers)
                {
                    pcr.Cleanup();
                }
            }

            renderers = null;

            var customPassVolume = gameObject.GetComponent <CustomPassVolume>();

            if (customPassVolume != null && customPassVolume.customPasses.Count == 1 &&
                customPassVolume.customPasses[0] is PointCloudRenderPass pass)
            {
                pass.UpdateRenderers(null);
            }
        }
Esempio n. 6
0
 private void OnDestroy()
 {
     PointCloudManager.HandleRendererRemoved(this);
 }
Esempio n. 7
0
 private void Start()
 {
     PointCloudManager.HandleRendererAdded(this);
 }