void OnDisable() { if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
// When we are destroyed void OnDisable() { Destroy(playerUIInstance); GameManager.instance.SetSceneCameraActive(true); GameManager.UnRegisterPlayer(transform.name); }
private void OnDisable() { if (cam.gameObject != null) { cam.gameObject.SetActive(true); GameManager.UnRegisterPlayer(transform.name); } }
void OnDisable() //To re-enable sceneCamera when player disconnects. { if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { if (startUpCamera != null) { Camera.main.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() //Is called when objectis destroyed { Cursor.lockState = CursorLockMode.None; if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { if (playerUIInstance != null) { Destroy(playerUIInstance.gameObject); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { if (isLocalPlayer) { GameManager.inst.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(networkID); Destroy(GUIInst); }
private void OnDisable() { Destroy(playerUIInstance); if (isLocalPlayer) { GameManager.instance.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
private void OnDisable() { Destroy(playerUIInstance); if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { if (isLocalPlayer) { GameManager.Instance.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
// When we are destroyed void OnDisable() { if (isLocalPlayer) { Destroy(playerUIInstance); GameManager.singleton.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
//When object is destroyed void OnDisable() { Debug.Log("destroyed or maybe not active"); if (isLocalPlayer) { GameManager.instance.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { Destroy(playerUIinstance); if (maincamera != null) { maincamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
private void OnDisable() { Destroy(playerUIInstance); if (sceneCamera) { Debug.Log("reactivate scene camera"); sceneCamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { Destroy(playerUIInstance); // Re enable scene camera if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } // Unregister when is destroy GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { Debug.LogError("OnDisable"); Destroy(guiInstance); if (isLocalPlayer) { GameManager.Instance.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable()//when this gameObject is disabled { Destroy(playerGUIInstance); if (isLocalPlayer) { GameManager.instance.SetSceneCamera(true); } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { if (isLocalPlayer) { GameManager.singelton.SetSceneCameraActive(true); Destroy(playerUIInstance); Cursor.visible = true; } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { Destroy(playerUIInstance); // if(sceneCamera != null) { // sceneCamera.gameObject.SetActive(true); // } GameManager.instance.SetSceneCameraActive(true); GameManager.UnRegisterPlayer(transform.name); }
//When we are destroyed void OnDisable() { Destroy(playerUIInstance); //Re-enable the scene camera if (sceneCamera != null) { sceneCamera.gameObject.SetActive(false); } GameManager.UnRegisterPlayer(transform.name); }
/* * Called when an object is destroyed * In this case if a player is destroyed the scene camera is set to active * This will be helpful on disconnect. * * And we get the players name and we UnRegister the player */ private void OnDisable() { Debug.Log("DISABLED " + name); Destroy(_playerUiInstance); if (isLocalPlayer) { GameManager.Singleton.SetSceneCamera(true); } //Deregister player GameManager.UnRegisterPlayer(transform.name); }
//When we are destroyed void OnDisable() { StopAllCoroutines(); Destroy(playerUIInstance); if (isLocalPlayer) { GameManager.instance.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
//when player is destroyed private void OnDisable() { //destory player UI Destroy(playerUIInstance); if (isLocalPlayer) { //Re-enable the scene camera GameManager.instance.SetSceneCameraActive(true); } GameManager.UnRegisterPlayer(transform.name); }
// wenn der Spieler deaktiviert (oder gelöscht) wurde, dann zeige wieder die sceneCamera void OnDisable() { // Cursor wieder sichtbar machen Cursor.lockState = CursorLockMode.None; Destroy(playerUIInstance); if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } GameManager.UnRegisterPlayer(transform.name); }
private void OnDisable() { Destroy(playerUIInstance); if (isLocalPlayer) { GameManager.instance.SetSceneCameraActive(true); } string _netID = GetComponent <NetworkIdentity>().netId.ToString(); GameManager.UnRegisterPlayer(transform.name); }
//When we are destroyed //To re enable the camera void OnDisable() { //To destroy player UI Destroy(playerUIInstance); if (isLocalPlayer) { GameManager.instance.SetSceneCameraActive(true); } //To deregister players once they are killed GameManager.UnRegisterPlayer(transform.name); }
// When we are destroyed void OnDisable() { Destroy(playerUIInstance); if (isLocalPlayer) { GameManager.instance.SetSceneCameraActive(true); Cursor.lockState = CursorLockMode.None; } GameManager.UnRegisterPlayer(transform.name); }
private void OnDisable() { if (isLocalPlayer) { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; // This is only to get rid of errors when exiting the game while in the unity editor if (sceneCamera != null) { sceneCamera.SetActive(true); } } GameManager.UnRegisterPlayer(transform.name); }
void OnDisable() { if (!this.isLocalPlayer) { return; } if (sceneCamera != null) { sceneCamera.gameObject.SetActive(true); } Cursor.visible = true; Cursor.lockState = CursorLockMode.None; GameManager.UnRegisterPlayer(transform.name); }