コード例 #1
0
        void DiscoverWeatherControllers()
        {
            rainDownfallController = GetComponentInChildren <RainDownfallController>();
            rainSplashController   = GetComponentInChildren <RainSplashController>();
            lightningController    = GetComponentInChildren <LightningController>();
            weatherDepthCamera     = GetComponentInChildren <WeatherDepthCamera>();

            detector = GetComponentInChildren <WeatherEnclosureDetector>();
        }
コード例 #2
0
        void Start()
        {
            // Verify GPU instancing is supported.
            if (SystemInfo.supportsInstancing == false)
            {
                Debug.LogError("Can't render rain splashes since GPU instancing is not supported on this platform.");
                enabled = false;
                return;
            }

            WeatherDepthCamera depthController = FindObjectOfType <WeatherDepthCamera>();

            if (depthController == null)
            {
                Debug.LogError("Can't generate splashes without a RainDepthCamera in the scene");
                enabled = false;
                return;
            }

            m_DepthCamera = depthController.GetComponent <Camera>();
        }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     m_RainCamera = FindObjectOfType <WeatherDepthCamera>();
     m_Image      = GetComponent <RawImage>();
 }