Fixed GameHandler null ref

This commit is contained in:
Julia Butenhoff 2022-04-08 19:30:36 -05:00
parent 4e0fb884ad
commit 896b57252b

View File

@ -36,7 +36,7 @@ public class GameHandler : NetworkBehaviour
if (character.GetComponent<NetworkObject>().OwnerClientId == NetworkManager.Singleton.LocalClientId) {
localPlayer = character;
if(FindGameObjectInChildWithTag(character, "UICam").GetComponent<Camera>() != null){
if(FindGameObjectInChildWithTag(character, "UICam") != null){
FindGameObjectInChildWithTag(character, "UICam").GetComponent<Camera>().enabled = true;
GameObject UICamera = FindGameObjectInChildWithTag(character, "UICam");