// Start is called before the first frame update private void Awake() { health = transform.GetComponent <Health>(); if (health == null) { Debug.Log("Couldn't find Health Component"); } PFC = GameObject.Find("NetworkController").GetComponent <PlayFabsController>(); if (PFC == null) { Debug.Log("Couldn't find NetworkController/PlayFabsController"); } pauseMenu = PFC.pauseMenu; //Delete this after inventory is setup inventory.Awake(); canvas = transform.GetChild(1).gameObject; //This makes the player "look" like he is aiming the gun at the "target" //If you edit this you must edit it in NetworkPlayer! offset = new Vector3(10, 47.32f, 12); //Find the joystick objects GameObject tempJoystickOne = canvas.gameObject.transform.GetChild(0).gameObject; GameObject tempJoystickOTwo = canvas.gameObject.transform.GetChild(1).gameObject; //Assign Joysticks to script variables [Left,Right] if (tempJoystickOne) { joystickOne = tempJoystickOne.GetComponent <FixedJoystick>(); } else { Debug.Log("No Left JoyStick"); } if (tempJoystickOTwo) { joystickTwo = tempJoystickOTwo.GetComponent <FixedJoystick>(); } else { Debug.Log("No Right JoyStick"); } CharacterController = GetComponent <CharacterController>(); }