RoadChunk.cs 577 B

1234567891011121314151617181920212223242526
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace JTSystems
  5. {
  6. public class RoadChunk : MonoBehaviour
  7. {
  8. [Header(" Chunks Settings ")]
  9. public float length;
  10. [Header(" Gizmos ")]
  11. public Color gizmosColor;
  12. private void OnDrawGizmos()
  13. {
  14. Vector3 center = transform.position + (length / 2 * Vector3.forward);
  15. Vector3 size = new Vector3(20, 20, length);
  16. Gizmos.color = gizmosColor;
  17. Gizmos.DrawWireCube(center, size);
  18. }
  19. }
  20. }