FindPath with LINQ

Here’s a LINQ statement that performs the FindPath functionality:

path = GameObject.FindGameObjectWithTag(“Path”).transform.Cast<Transform>().Select(t => t.GetComponent<Waypoint>()).ToList();

4 Likes

Privacy & Terms