I've got 2 first person controller scripts, one that handles functionality for basic movement, the other handling looking around. I also have a "CursorLockManager" script, that handles the cursor locking, as well as locking movement and looking (for when opening menus and such). At the beginning of the cursor lock script, in the start function, I have two GameObject.FindWithTag lines. One looks for the playerLook script, and the other looks for the playerMove script. I have them both set up the same way, but one of them isn't working.
First few lines of the CursorLockManager script:
public KeyCode menuKey; public PlayerLook playerLook; public PlayerMove playerMove; public bool menuIsOpened; public GameObject tempMenu; private void Start() { playerLook = GameObject.FindWithTag("Camera").GetComponent<PlayerLook>(); playerMove = GameObject.FindWithTag("FP_Controller").GetComponent<PlayerMove>(); } and the error Unity is throwing:
UnityException: Tag: Camera is not defined
Line 17 of the CursorLockManager:
playerLook = GameObject.FindWithTag("Camera").GetComponent<PlayerLook>(); Any help would be greatly appreciated. If you need any further clarification as to anything else, I'd be glad to provide it to you.
