public void ShowContent(ARFile file) { // arRoot can, upon finding a marker, open its own window // in order to close all unnecessary things that should not // be on the screen during AR exploration. // it will close itself. It will also be closed when any other content is shown. arRoot.ShowContent(file); }
void ShowContent(MyFile content) { activeFile = content; if (!gameObject.activeInHierarchy) { return; } DeactivateAll(); switch (content) { case ImageFile file: imageContentContainer.gameObject.SetActive(true); imageContentContainer.ShowContent(file); if (popupWindow != null) { popupWindow.gameObject.SetActive(true); } break; case VideoFile file: videoContentContainer.gameObject.SetActive(true); videoControlOverlay.SetActive(true); videoContentContainer.showControls = App.guideSync.isServer; videoContentContainer.ShowContent(file); if (popupWindow != null) { popupWindow.gameObject.SetActive(true); } break; case ARFile file: // the AR scene will trigger arContentContainer to show foreach (var o in hideOnARShowContent) { o.SetActive(false); } arRoot.ShowContent(file); break; case TextFile file: textContentContainer.gameObject.SetActive(true); textContentContainer.ShowContent(file); if (popupWindow != null) { popupWindow.gameObject.SetActive(true); } break; case GameFile file: gameContentContainer.gameObject.SetActive(true); gameContentContainer.ShowContent(); if (popupWindow != null) { popupWindow.gameObject.SetActive(false); } break; } }