private void Start() { errorCodeLabel = GameObject.FindGameObjectWithTag("ErrorCodeLabel"); errorCodeLabel.GetComponent <Text>().color = Color.red; loginCredentials = GetComponent <LoginCredentials>(); orchestrator = GameObject.FindGameObjectWithTag("Orchestrator"); panelHandler = GameObject.FindGameObjectWithTag("PanelExchanger"); inputField = GetComponentsInChildren <InputField>(); checkButton = GameObject.FindGameObjectWithTag("CheckButton"); urlInput = loginCredentials.GetLastURL(); usernameInput = loginCredentials.GetLastUserName(); foreach (InputField input in inputField) { input.onEndEdit.AddListener(delegate { CheckInput(input); }); } checkButton.GetComponent <Button>().onClick.AddListener(ControlAuthentication); }