public void Awake() { // Get reference to player camera controller _cameraController = FindObjectOfType<PlayerCameraController>(); if (_cameraController == null) { Debug.LogError("Unable to find player camera controller within scene"); } _mainCamera = _cameraController.GetComponentInChildren<Camera>(); // Get reference to player _player = FindObjectOfType<Player>(); if (_player == null) { Debug.LogError("TouchInput script unable to find player script within scene"); } }
public void Awake() { // Get reference to player camera controller _cameraController = FindObjectOfType <PlayerCameraController>(); if (_cameraController == null) { Debug.LogError("Unable to find player camera controller within scene"); } _mainCamera = _cameraController.GetComponentInChildren <Camera>(); // Get reference to player _player = FindObjectOfType <Player>(); if (_player == null) { Debug.LogError("TouchInput script unable to find player script within scene"); } }