예제 #1
0
 private void ButtonChange(ButtonStatus status)
 {
     if (m_active && !status.activate && status.SelectionType == SelectionType.INFO && !m_appState.editSession.IsActive())
     {
         gameObject.SetActive(false);
         textBox.text = m_lastText;
     }
 }
예제 #2
0
        protected void Awake()
        {
            Debug.Log("AppState awakens");
            if (instance == null)
            {
                Debug.Log("AppState instance assigned");
                instance = this;
            }
            else if (instance != this)
            {
                // there cannot be another instance
                Debug.Log("AppState found another instance");
                Destroy(gameObject);
            }
            DontDestroyOnLoad(gameObject);
            _editSession = new EditSession();
            _layers      = new List <VirgisLayer>();
            Zoom         = new ZoomEvent();
            Project      = new ProjectChange();
            Info         = new InfoEvent();
            ButtonStatus = new ButtonStatus();
            Orientation  = new OrientEvent();
            LayerUpdate  = new LayerChange();

            initsub = Project.Event.Subscribe(proj => Init());
            try {
                GdalConfiguration.ConfigureOgr();
            } catch (Exception e) {
                Debug.LogError(e.ToString());
            };
            try {
                GdalConfiguration.ConfigureGdal();
            } catch (Exception e) {
                Debug.LogError(e.ToString());
            };
            try {
                PdalConfiguration.ConfigurePdal();
            } catch (Exception e) {
                Debug.LogError(e.ToString());
            };
            try {
                Debug.Log($" MDAL Version : {MdalConfiguration.ConfigureMdal()}");
            } catch (Exception e) {
                Debug.LogError(e.ToString());
            }
            Gdal.SetConfigOption("CURL_CA_BUNDLE", Path.Combine(Application.streamingAssetsPath, "gdal", "cacert.pem"));
        }