Exemplo n.º 1
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);
        }
Exemplo n.º 2
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;
        }