I’m new to this asset, this there any way to visualise line similar to in scene view when you turn on gizmos. How to generate exact same line using Line renderer component? I found this topic Displaying path from pointgraph in the scene but don’t know where to put this piece of code. If you know the way how to do it, pls explain as to child, I’m really bad at coding(
p.s. i am using grid graph in a 2d top down game and seeker, AILerp and DestinationSettler scrips
Sorry to interrupt, if i take code from example using GetRemainingPath which looks like
var buffer = new List<Vector3>();
ai.GetRemainingPath(buffer, out bool stale);
for (int i = 0; i < buffer.Count - 1; i++)
{
Debug.DrawLine(buffer[i], buffer[i + 1], Color.blue);
}
and if put inside “for”
linerender.SetPosition(int , buffer[i + 1]);
what i should type for int to get the same result as on debug?
My questions are really stupid, sorry
var buffer = new List<Vector3>();
ai.GetRemainingPath(buffer, out bool stale);
linerenderer.positionCount = buffer.Count;
linerenderer.SetPositions(buffer.ToArray());