usingGley.TrafficSystem;usingSystem.Collections.Generic;usingUnityEngine;publicclassTest:MonoBehaviour{ //a reference to vehicle pool and player assigned in inspectorpublicVehiclePool vehiclePool;publicTransform player;voidStart() {API.Initialize(player,20, vehiclePool); //listen for the destination reached eventEvents.onDestinationReached+= OnDestinationReached; }publicvoidAddPathToVehicle() { //get the path from start to endVector3 startPosition =newVector3(0,0,0);Vector3 endPosition =newVector3(0,0,350);List<int> path =API.GetPath(startPosition, endPosition,VehicleTypes.Car);if (path.Count>0) { //assign the path to the vehicle with index 10API.SetVehiclePath(10,newQueue<int>(path)); }else {Debug.Log("No path found"); } }privatevoidOnDestinationReached(int vehicleIndex) { //when vehicle 10 reaches the destination, remove the path and continue as a normal vehicle.if(vehicleIndex ==10) {API.RemoveVehiclePath(10); } }privatevoidOnDestroy() { //don't forget to remove the eventsEvents.onDestinationReached-= OnDestinationReached; }}