void DiscoverWeatherControllers() { rainDownfallController = GetComponentInChildren <RainDownfallController>(); rainSplashController = GetComponentInChildren <RainSplashController>(); lightningController = GetComponentInChildren <LightningController>(); weatherDepthCamera = GetComponentInChildren <WeatherDepthCamera>(); detector = GetComponentInChildren <WeatherEnclosureDetector>(); }
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>(); }
// Use this for initialization void Start() { m_RainCamera = FindObjectOfType <WeatherDepthCamera>(); m_Image = GetComponent <RawImage>(); }