Пример #1
0
        // Use this for initialization
        void Start()
        {
            GI_PROXY_script = this.gameObject.GetComponent(typeof(LightCollisionsPDM)) as LightCollisionsPDM;

            if (PointLight != null)
            {
                PointLight.gameObject.SetActive(true);

                GI_PROXY_POINT_script = PointLight.gameObject.GetComponentInChildren(typeof(LightCollisionsPDM)) as LightCollisionsPDM;

                if (GI_PROXY_POINT_script != null)
                {
                    PointLight.gameObject.SetActive(false);
                }
            }

            if (SpotLight != null)
            {
                SpotLight.gameObject.SetActive(true);

                GI_PROXY_SPOT_script = SpotLight.gameObject.GetComponentInChildren(typeof(LightCollisionsPDM)) as LightCollisionsPDM;

                if (GI_PROXY_SPOT_script != null)
                {
                    SpotLight.gameObject.SetActive(false);
                }
            }

            Initial_point_light_pos = PointLight.transform.position;
        }
        // Use this for initialization
        void Start()
        {
            //v3.4
            //QualitySettings.shadowDistance = 150; //v3.4.9 disable these two, as they creak volumetric lighting initialization !!!
            //QualitySettings.shadowCascades = 2;
            //QualitySettings.antiAliasing =

            //InitPos =

            GI_PROXY_script = this.gameObject.GetComponent(typeof(LightCollisionsPDM)) as LightCollisionsPDM;

            if (PointLight != null)
            {
                PointLight.gameObject.SetActive(true);

                GI_PROXY_POINT_script = PointLight.gameObject.GetComponentInChildren(typeof(LightCollisionsPDM)) as LightCollisionsPDM;

                if (GI_PROXY_POINT_script != null)
                {
                    PointLight.gameObject.SetActive(false);
                }
            }

            if (SpotLight != null)
            {
                SpotLight.gameObject.SetActive(true);

                GI_PROXY_SPOT_script = SpotLight.gameObject.GetComponentInChildren(typeof(LightCollisionsPDM)) as LightCollisionsPDM;

                if (GI_PROXY_SPOT_script != null)
                {
                    SpotLight.gameObject.SetActive(false);
                }
            }

            Initial_point_light_pos = PointLight.transform.position;
            current_time            = Time.fixedTime;
        }
 // Use this for initialization
 void Start()
 {
     GI_PROXY_script = this.gameObject.GetComponent(typeof(LightCollisionsPDM)) as LightCollisionsPDM;
 }