public void SetUserPosition(UserPosition position, int posIndex, Action callback = null) { //Check if we need to destroy the room experience if ((CurrentUserPosition == UserPosition.ThirdPartyRoom || CurrentUserPosition == UserPosition.ThirdPartyTable) && position != CurrentUserPosition && AlcoveThirdPartyExperienceController.CurrentThirdPartyExperience != null && AlcoveThirdPartyExperienceController.CurrentThirdPartyExperience.photonView.isMine) { ThirdPartyExperienceType type = CurrentUserPosition == UserPosition.ThirdPartyRoom ? ThirdPartyExperienceType.Room : ThirdPartyExperienceType.Tabletop; NotificationPanel.NotificationData notificationData = new NotificationPanel.NotificationData(); notificationData.AcceptButtonText = "Ok"; notificationData.CancelButtonText = "Cancel"; notificationData.HeaderText = "Leaving game"; notificationData.MessageText = "If you leave the table, the game will end!"; notificationData.AcceptCallback = delegate { AlcoveThirdPartyExperienceController.getInstance().DestroyThirdPartyExperience(type); SetUserPosition(position, callback); }; NotificationPanel.getInstance().ShowNotification(notificationData, true); return; } if (MinorTeleportationLocation.CurrentPositionCollider) { MinorTeleportationLocation.CurrentPositionCollider.enabled = true; } CurrentUserPosition = position; CurrentUserPositionIndex = posIndex; m_CurrentUserPositionTransform = SetObjectPosition(CameraController.CameraContainer, position, posIndex); //Setup room colliders m_FamilyRoomCollider.enabled = CurrentUserPosition != UserPosition.Family; m_EntertainmentAreaCollider.enabled = CurrentUserPosition != UserPosition.Entertainment; m_TravelAreaCollider.enabled = CurrentUserPosition != UserPosition.Travel; m_HealthAreaCollider.enabled = CurrentUserPosition != UserPosition.Health; m_ThirdPartyTableCollider.enabled = CurrentUserPosition != UserPosition.ThirdPartyTable; m_ThirdPartyRoomCollider.enabled = CurrentUserPosition != UserPosition.ThirdPartyRoom; m_ThirdPartyRoomExitCollider.enabled = CurrentUserPosition == UserPosition.ThirdPartyRoom; HideAllTeleportationGraphics(); callback?.Invoke(); if (m_OnPositionChanged != null) { m_OnPositionChanged(CurrentUserPosition, CurrentUserPositionIndex); } }