SpatialPanel.cs 762 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using EZXR.Glass.Inputs;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEditor;
  5. using UnityEngine;
  6. namespace EZXR.Glass.UI
  7. {
  8. public class SpatialPanel : SpatialUIElement
  9. {
  10. protected override void OnValidate()
  11. {
  12. GetComponent<LayoutGroup>()?.OnValidate();
  13. }
  14. protected override void Awake()
  15. {
  16. base.Awake();
  17. }
  18. // Update is called once per frame
  19. protected override void Update()
  20. {
  21. base.Update();
  22. if (Application.isPlaying)
  23. {
  24. }
  25. else
  26. {
  27. #if UNITY_EDITOR
  28. _meshRenderer.gameObject.SetActive(Texture != null);
  29. #endif
  30. }
  31. }
  32. }
  33. }