AnimationSampleDependency.cs 723 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace Unity.U2D.Animation.Sample.Dependency
  5. {
  6. [ExecuteInEditMode]
  7. internal class AnimationSampleDependency : MonoBehaviour
  8. {
  9. public UnityEngine.UI.Text textField = null;
  10. public GameObject gameCanvas = null;
  11. void Update()
  12. {
  13. #if PSDIMPORTER_ENABLED
  14. if(textField != null)
  15. textField.enabled = false;
  16. if(gameCanvas != null)
  17. gameCanvas.SetActive(true);
  18. #else
  19. if(textField != null)
  20. textField.enabled = true;
  21. if(gameCanvas != null)
  22. gameCanvas.SetActive(false);
  23. #endif
  24. }
  25. }
  26. }