HintAnimControlTools.cs 794 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using UnityEngine;
  3. namespace SceneStory
  4. {
  5. [ExecuteInEditMode]
  6. [AddComponentMenu("FantaBlade/剧情动画编辑器/编辑器辅助工具/动画标签提示工具")]
  7. public class HintAnimControlTools : BaseBehaviour
  8. {
  9. public void SetHint(string hint)
  10. {
  11. this.hint = hint;
  12. }
  13. private void OnDrawGizmos()
  14. {
  15. if (string.IsNullOrEmpty(this.hint))
  16. {
  17. this.hint = base.name;
  18. }
  19. if (this.show)
  20. {
  21. DebugX.DrawText(this.hint, base.transform.position);
  22. Color col = this.color;
  23. DebugX.DrawPoint(base.transform.position, col, 0.1f);
  24. }
  25. }
  26. [SerializeField]
  27. private bool show = true;
  28. [SerializeField]
  29. private string hint;
  30. [SerializeField]
  31. private Color color = new Color(0.7f, 0.3f, 0.15f);
  32. }
  33. }