GizmosDebug.cs 588 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. namespace ET
  4. {
  5. public class GizmosDebug: MonoBehaviour
  6. {
  7. public static GizmosDebug Instance { get; private set; }
  8. public List<Vector3> Path;
  9. private void Awake()
  10. {
  11. Instance = this;
  12. }
  13. private void OnDrawGizmos()
  14. {
  15. if (this.Path.Count < 2)
  16. {
  17. return;
  18. }
  19. for (int i = 0; i < Path.Count - 1; ++i)
  20. {
  21. Gizmos.DrawLine(Path[i], Path[i + 1]);
  22. }
  23. }
  24. }
  25. }