I'm drawing a line with a LineRenderer. It works, but now I would like it the line to be drawn gradually, instead of appearing all at once.
How can I modify my code to achieve this?
using System.Collections; using System.Collections.Generic; using UnityEngine; public class LineController : MonoBehaviour { private LineRenderer Ir; private Transform [] points; private void Awake(){ Ir = GetComponent <LineRenderer>(); } public void SetUpLine (Transform[] points){ Ir.positionCount = points.Length; this.points = points; } private void Update (){ for (int i = 0; i < points.Length; i++) { Ir.SetPosition(i, points[i].position); Debug.Log (points[i].position); } } }