LoadOverheadDepthTexture.cs 589 B

1234567891011121314151617181920212223242526
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace Funly.SkyStudio
  6. {
  7. [RequireComponent(typeof(RawImage))]
  8. public class LoadOverheadDepthTexture : MonoBehaviour
  9. {
  10. WeatherDepthCamera m_RainCamera;
  11. RawImage m_Image;
  12. // Use this for initialization
  13. void Start()
  14. {
  15. m_RainCamera = FindObjectOfType<WeatherDepthCamera>();
  16. m_Image = GetComponent<RawImage>();
  17. }
  18. private void Update()
  19. {
  20. m_Image.texture = m_RainCamera.overheadDepthTexture;
  21. }
  22. }
  23. }