public void resetRouteNodes(int npc_no) { List <GameObject> wps = (new List <GameObject>(GameObject.FindGameObjectsWithTag("WP"))); wps.AddRange(new List <GameObject>(GameObject.FindGameObjectsWithTag("GhostPen"))); foreach (GameObject wp in wps) { if (debug) { wp.GetComponentInChildren <MeshRenderer>().material = DebugNeutral; } NodeBehaviour wp_nb = wp.GetComponent <NodeBehaviour>(); wp_nb.reset(npc_no - 1); } }