using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UILineRenderer : Graphic { public Vector2Int gridSize; public UIGridRenderer grid; public List points; float width; float height; float unitWidth; float unitHeight; public float thickness = 10f; public void Redraw() { SetVerticesDirty(); } protected override void OnPopulateMesh(VertexHelper vh) { vh.Clear(); width = rectTransform.rect.width; height = rectTransform.rect.height; unitWidth = width / (float)gridSize.x; unitHeight = height / (float)gridSize.y; if (points.Count < 2) { return; } float angle = 0; for (int i = 0; i < points.Count; i++) { Vector2 point = points[i]; if (i