protected override void Update()
        {
            base.Update();

            if (Material != null)
            {
                Material.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (MaterialSecondary != null)
            {
                MaterialSecondary.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (MistMaterial != null)
            {
                MistMaterial.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (ExplosionMaterial != null)
            {
                ExplosionMaterial.EnableKeyword("ORTHOGRAPHIC_MODE");
            }

            cameraMultiplier  = (Camera.orthographicSize * 0.25f);
            visibleBounds.min = Camera.ViewportToWorldPoint(Vector3.zero);
            visibleBounds.max = Camera.ViewportToWorldPoint(Vector3.one);
            visibleWorldWidth = visibleBounds.size.x;
            yOffset           = (visibleBounds.max.y - visibleBounds.min.y) * HeightMultiplier;

            TransformParticleSystem(ParticleSystem, InitialStartSpeed, InitialStartSize);
            TransformParticleSystem(ParticleSystemSecondary, InitialStartSpeedSecondary, InitialStartSizeSecondary);
            TransformParticleSystem(MistParticleSystem, InitialStartSpeedMist, InitialStartSizeMist);

            CheckForCollisionsParticles();
            CheckForCollisionsMistParticles();
        }
        public override void PreCullCamera(Camera c)
        {
#if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                return;
            }
#endif

            if (Material != null)
            {
                Material.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (MaterialSecondary != null)
            {
                MaterialSecondary.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (MistMaterial != null)
            {
                MistMaterial.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (ExplosionMaterial != null)
            {
                ExplosionMaterial.EnableKeyword("ORTHOGRAPHIC_MODE");
            }

            cameraMultiplier  = (WeatherMakerScript.Instance.CurrentCamera.orthographicSize * 0.25f);
            visibleBounds.min = WeatherMakerScript.Instance.CurrentCamera.ViewportToWorldPoint(Vector3.zero);
            visibleBounds.max = WeatherMakerScript.Instance.CurrentCamera.ViewportToWorldPoint(Vector3.one);
            visibleWorldWidth = visibleBounds.size.x;
            yOffset           = (visibleBounds.max.y - visibleBounds.min.y) * HeightMultiplier;

            TransformParticleSystem(ParticleSystem, InitialStartSpeed, InitialStartSize);
            TransformParticleSystem(ParticleSystemSecondary, InitialStartSpeedSecondary, InitialStartSizeSecondary);
            TransformParticleSystem(MistParticleSystem, InitialStartSpeedMist, InitialStartSizeMist);

            CheckForCollisionsParticles();
            CheckForCollisionsMistParticles();
        }
        /// <summary>
        /// Camera pre cull event
        /// </summary>
        /// <param name="camera">Camera</param>
        protected override void OnCameraPreCull(Camera camera)
        {
#if UNITY_EDITOR
            if (!Application.isPlaying || camera.cameraType != CameraType.Game)
            {
                return;
            }
#endif

            if (Material != null)
            {
                Material.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (MaterialSecondary != null)
            {
                MaterialSecondary.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (MistMaterial != null)
            {
                MistMaterial.EnableKeyword("ORTHOGRAPHIC_MODE");
            }
            if (ExplosionMaterial != null)
            {
                ExplosionMaterial.EnableKeyword("ORTHOGRAPHIC_MODE");
            }

            cameraMultiplier   = (camera.orthographicSize * 0.25f);
            visibleWorldWidth  = camera.orthographicSize * 2.0f;
            yOffset            = visibleWorldWidth * HeightMultiplier;
            visibleWorldWidth *= camera.aspect;

            TransformParticleSystem(ParticleSystem, camera, InitialStartSpeed, InitialStartSize);
            TransformParticleSystem(ParticleSystemSecondary, camera, InitialStartSpeedSecondary, InitialStartSizeSecondary);
            TransformParticleSystem(MistParticleSystem, camera, InitialStartSpeedMist, InitialStartSizeMist);

            CheckForCollisionsParticles();
            CheckForCollisionsMistParticles();
        }