예제 #1
0
        void Awake()
        {
            UpdateGradientVectors();

            _cloudsSharedProperties = new Clouds.SharedProperties();
            UpdateSharedFromPublicProperties();
        }
예제 #2
0
 void Start()
 {
     SetCamera(targetCamera);
     _cloudsSharedProperties = new Clouds.SharedProperties();
     UpdateSharedFromPublicProperties();
     CreateMaterialsIfNeeded();
     CreateRenderTextures();
     CreateFullscreenQuad();
 }
예제 #3
0
        void Reset()
        {
            targetCamera = Camera.main;
            sunLight     = FindDirectionalLightInScene();

            cloudGradient1 = cloudGradient1 ?? CreateCloudGradient(0.011f, 0.098f, 0.126f, 0.225f);
            cloudGradient2 = cloudGradient2 ?? CreateCloudGradient(0.0f, 0.096f, 0.311f, 0.506f);
            cloudGradient3 = cloudGradient3 ?? CreateCloudGradient(0.0f, 0.087f, 0.749f, 1.0f);

            UpdateGradientVectors();

            _cloudsSharedProperties = new Clouds.SharedProperties();
            UpdateSharedFromPublicProperties();
        }
예제 #4
0
        void OnValidate()
        {
            if (_cloudsSharedProperties == null)
            {
                _cloudsSharedProperties = new Clouds.SharedProperties();
            }

            _coverageOffset.Set(coverageOffsetX, coverageOffsetY);

            UpdateGradientVectors();
            UpdateSharedFromPublicProperties();

            if (onValidateDelegate != null)
            {
                onValidateDelegate();
            }
        }