public PlatformDataManager() { //this.platformDatas = new List<PlatformData>(); this.PlatformDataList = new PlatformDataList(); this.PlatformDataList.platformDatas = new List <PlatformData>(); loadActiveScenes(); }
/// <summary> /// this method loads the scene configuration file /// </summary> public void loadData() { XmlSerializer serializer = new XmlSerializer(typeof(PlatformDataList)); string path = Application.dataPath + "/Buildsystem/StreamingFiles/XML/save_platformConfig.xml"; if (File.Exists(path)) { Debug.Log("File exists and ready to load"); using (FileStream stream = new FileStream(path, FileMode.Open)) { PlatformDataList = serializer.Deserialize(stream) as PlatformDataList; stream.Close(); } Debug.Log("Stream load Closed"); } else { Debug.Log("No platform config found"); } }