public void SetProject(GisProject project) { if (this.payload != null) { payload = JsonConvert.SerializeObject(project, Formatting.Indented); } }
public GisProject GetProject() { GisProject project = JsonConvert.DeserializeObject <GisProject>(payload); string test1 = project.ProjectVersion; string test2 = GisProject.GetVersion(); if (project.ProjectVersion != GisProject.GetVersion()) { Debug.LogError("This project was created in a different version of ViRGIS and may not be loaded correctly"); } return(project); }
///<summary> ///Instantiates all singletons. /// </summary> protected new void Awake() { Debug.Log("Map awakens"); Debug.Log($"Virgis version : {Application.version}"); Debug.Log($"Project version: {GisProject.GetVersion()}"); if (AppState.instance == null) { Debug.Log("instantiate app state"); appState = Instantiate(appState); } startsub = appState.editSession.StartEvent.Subscribe(_onStartEditSession); stopsub = appState.editSession.EndEvent.Subscribe(_onExitEditSession); //set globals appState.map = gameObject; }
public void Set(GisProject project) { _project = project; }