using System.Collections.Generic; using UnityEngine; // ÀÎÅÍÆäÀ̽º public interface IPathLineView { void DrawPath(List poses); // (RobotProgram.Steps¿¡¼­ º¯È¯) } [RequireComponent(typeof(LineRenderer))] public class PathLineView : MonoBehaviour, IPathLineView { private LineRenderer lineRenderer; void Awake() { lineRenderer = GetComponent(); lineRenderer.positionCount = 0; } public void DrawPath(List poses) { if (poses == null || poses.Count < 2) { lineRenderer.positionCount = 0; return; } lineRenderer.positionCount = poses.Count; for (int i = 0; i < poses.Count; i++) { lineRenderer.SetPosition(i, new Vector3(poses[i].x, poses[i].y, poses[i].z)); } } }