DebugTipPanel.cs 890 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Rokid.UXR.UI;
  2. using UnityEngine.UI;
  3. using UnityEngine;
  4. namespace Rokid.UXR.UI
  5. {
  6. [ExecuteInEditMode]
  7. public class DebugTipPanel : BasePanel, IDialog
  8. {
  9. [SerializeField]
  10. private Image icon;
  11. public enum DebugType
  12. {
  13. GESTURE,
  14. MOUSE,
  15. RAY
  16. }
  17. public void Init(DebugType type)
  18. {
  19. switch (type)
  20. {
  21. case DebugType.GESTURE:
  22. icon.sprite = Resources.Load<Sprite>("Textures/Mock/Gesture");
  23. break;
  24. case DebugType.MOUSE:
  25. icon.sprite = Resources.Load<Sprite>("Textures/Mock/Mouse");
  26. break;
  27. case DebugType.RAY:
  28. icon.sprite = Resources.Load<Sprite>("Textures/Mock/Ray");
  29. break;
  30. }
  31. }
  32. }
  33. }