void RefreshLinePoints() { CachedLineRenderer.SetVertexCount(linePoints.Count); for (int i = 0; i < linePoints.Count; i++) { CachedLineRenderer.SetPosition(i, linePoints [i]); } }
IEnumerator DrawSwishEffect() { AddPoint(CachedTransform.position); AddPoint(CachedTransform.position); while (true) { yield return(new WaitForEndOfFrame()); if (GetCurrentSegmentLength() >= minimumPointDistance) { AddPoint(CachedTransform.position); } else { CachedLineRenderer.SetPosition(linePoints.Count - 1, CachedTransform.position); } } }