diff --git a/Packages/com.vrchat.ClientSim/Runtime/System/ClientSimMenu.cs b/Packages/com.vrchat.ClientSim/Runtime/System/ClientSimMenu.cs index 1ffc2bd..8db1692 100644 --- a/Packages/com.vrchat.ClientSim/Runtime/System/ClientSimMenu.cs +++ b/Packages/com.vrchat.ClientSim/Runtime/System/ClientSimMenu.cs @@ -278,6 +278,8 @@ private void ToggleMenu(bool isActive) _menuIsActive = isActive; menu.SetActive(isActive); + ToggleCameraStacking(isActive); + _eventDispatcher.SendEvent(new ClientSimMenuStateChangedEvent { isMenuOpen = _menuIsActive }); if (_menuIsActive) @@ -293,6 +295,19 @@ private void ToggleMenu(bool isActive) { _eventDispatcher.Unsubscribe(OnPlayerMoved); } + + + } + + private void ToggleCameraStacking(bool isActive) + { + if (_menuCanvas.worldCamera == null) + { + return; + } + + Camera cam = _menuCanvas.worldCamera; + cam.enabled = isActive; } // TODO update position based on tracking type. Desktop should always be in front of the camera and VR @@ -512,4 +527,4 @@ public void UpdateConsoleLogging(bool consoleLogging) #endregion } -} \ No newline at end of file +}