/// <summary> /// Instantiates a CarAI object and sets its path /// </summary> /// <param name="jsonPath"></param> private void SpawnNonAPICar(List <Node> path) { CarAI car = CarPrefabs[UnityEngine.Random.Range(0, CarPrefabs.Length)].GetPooledInstance <CarAI>(); car.transform.localScale.Set(0.25f, 0.15f, 0.25f); car.NonAPICar = true; car.Init(); car.Pather.Map = Map; car.Pather.Path = path; car.SetNextEdge(0); car.Pather.PathReady = true; }