At the top
public GameObject[] waypoints;
In Start
void Start()
{
waypoints = GameObject.FindGameObjectsWithTag("Waypoint");
}
In the Hierarchy i have 5 Spheres: In this order:
But when using a break point i see in the variable waypoints:
Why when getting the waypoints in the script they are not in the same order ?