Esempio n. 1
0
 public void SetProject(GisProject project)
 {
     if (this.payload != null)
     {
         payload = JsonConvert.SerializeObject(project, Formatting.Indented);
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        ///<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;
        }
Esempio n. 4
0
 public void Set(GisProject project)
 {
     _project = project;
 }