private void CreateSession() { easyarObject = Instantiate(EasyARSession); easyarObject.SetActive(true); session = easyarObject.GetComponent <ARSession>(); vioCamera = easyarObject.GetComponentInChildren <VIOCameraDeviceUnion>(); mapFrameFilter = easyarObject.GetComponentInChildren <SparseSpatialMapWorkerFrameFilter>(); mapSession = new MapSession(mapFrameFilter, selectedMaps); }
public void SetMapSession(MapSession session) { mapSession = session; if (mapSession.MapWorker) { mapSession.MapWorker.MapLoad += (arg1, arg2, arg3, arg4) => { StartCoroutine(CheckVideo()); }; } }
private void DestroySession() { if (mapSession != null) { mapSession.Dispose(); mapSession = null; } if (easyarObject) { Destroy(easyarObject); } }
public void ClearAll() { // Notice: // a) When clear both map cache and map list, // load map will not trigger a download (cache is build when upload), // and statistical request count will not be increased in a subsequent load (when edit or preview). // b) When clear map cache only, // load map after clear (only the first time each map) will trigger a download, // and statistical request count will be increased in a subsequent load (when edit or preview). // Map cache is used after a successful download and will be cleared if SparseSpatialMapManager.clear is called or app uninstalled. // // More about the statistical request count and limitations for different subscription mode can be found at EasyAR website. if (!ViewManager.Instance.MainViewRecycleBinClearMapCacheOnly) { // clear map meta and the list on UI foreach (var cell in cells) { if (cell) { MapMetaManager.Delete(cell.MapMeta); Destroy(cell.gameObject); } } cells.Clear(); } // clear map cache MapSession.ClearCache(); // UI notification OnCellChange(); if (!ViewManager.Instance.MainViewRecycleBinClearMapCacheOnly) { easyar.GUIPopup.EnqueueMessage( "DELETED: {(Sample) Meta Data, Map Cache}" + Environment.NewLine + "NOT DELETED: {Map on Server}" + Environment.NewLine + "Use web develop center to manage maps on server", 5); } else { easyar.GUIPopup.EnqueueMessage( "DELETED: {Map Cache}" + Environment.NewLine + "NOT DELETED: {Map on Server, (Sample) Meta Data}" + Environment.NewLine + "Use web develop center to manage maps on server", 5); } }
private void OnDisable() { mapSession = null; StopEdit(); }
public void SetMapSession(MapSession session) { mapSession = session; }
public void SetMapSession(MapSession session) { mapData = session.Maps[0]; PropDragger.SetMapSession(session); }