public void OnChangeIsOnARcamera() { if (!isStartGame) { bool isArCameraMark = checkMarkBtn.isOn; if (isArCameraMark) //ar camera on { checkMarkBtn.isOn = false; isArCameraOn = true; //show message to user that he cant convert to ar camera while game arOnMessageContainer.SetActive(true); } else //ar camera off { isArCameraOn = false; Debug.Log("AR camera off (" + NetworkClient.users[NetworkClient.clientID].name + ")"); LobbyState.cameraState = LobbyState.AR_OFF; NetworkClient.DestroyServerObject(); arCamera.GetComponent <VuforiaBehaviour>().enabled = false; arCamera.GetComponent <Camera>().enabled = false; gameWithArContainer.SetActive(false); gameWithoutArContainer.SetActive(true); serverObject = GameObject.FindGameObjectWithTag("serverObjects");//update to serverObject2 NetworkClient.users[NetworkClient.clientID].socket.Emit("ARcameraOff"); maincamera.enabled = true; stadium = GameObject.FindGameObjectWithTag("stadium"); Debug.Log("stadium=" + stadium.name); stadium.SetActive(true); scanUI.SetActive(false); menuUI.SetActive(true); } } }