void Start() { _mapLoaderService.populateMaps(); currentMapArrange = StaticMapCreateData._mapList [0]; mapView = Instantiate(mapPrefab, Vector3.zero, Quaternion.identity); mapView.GetComponent <MapView> ()._mapModel = currentMapArrange; }
//creates new map list in staticdata void Start() { if (StaticAllData.clientPracticeMaps == null) { StaticAllData.clientPracticeMaps = new List <MapModel> (); MapLoaderService.populateMaps(); } //gets maps from server //mapRequest = new MapRequest (); //change to singleton in zenject //mapRequest.GetAllMaps(); //resets current map, gets it StaticAllData.currentMap = null; if (StaticAllData.clientPracticeMaps.Count != 0) { selectedAllMap = StaticAllData.clientPracticeMaps [0]; } //creates "myMaps" as opposed to all maps myMaps = new List <MapModel> (); if (myMaps.Count > 0) { selectedMyMap = myMaps [0]; } foreach (MapModel map in StaticAllData.clientPracticeMaps) { myMaps.Add(map); } }