public void TestDrive() { PlayerManager.Type = "CarPlayer"; Camera _followCam = GameObject.Find("FollowCamInner").GetComponent <Camera>(); _followCam.enabled = true; BuildingPlayManager.Current = null; Destroy(GameObject.Find("BuilderPlayer(Clone)")); Destroy(this.gameObject); Road.Instance.CalculateBends(); DrivingPlayManager DPM = new DrivingPlayManager(); DrivingPlayManager.Current = DPM; DPM.PlayOffline(Main.Instance.Vehicle, Main.Instance.Color); CamSelector.Instance.SelectCam("FollowCamSwing"); BezierLine.Instance.DeleteAllRoadMarkers(); BezierLine.Instance.EraseLine(); foreach (PlaceableObject PO in Scenery.Instance.Objects) { PO.DisableClickColliders(); PO.HideAllGizmos(); } foreach (RoadSectn RS in Road.Instance.Sectns) { RS.BuildFenceColliderTriangles(); foreach (iRoadSeg s in RS.Segments) { s.CreateFenceColliderVerts(); } if (RS.goSectn != null) { MeshCollider[] C = RS.goSectn.GetComponents <MeshCollider>(); foreach (MeshCollider mc in C) { Destroy(mc); } } RS.CreateFenceColliders(); } Race.Current.ReadySteady(); }