please help with UI, Hello! I had a problem activating the UI through the script, more specifically with the InputField

I tried to activate InputField through the ActivateInputField and InputField.enabled functions but all without success

public InputField IF = new InputField[2];
void OnTriggerStay(Collider player)
{
if (player.tag == “Player” && id == 1)
{
IF[0].enabled = true;
print(“all is okey”);
if (password == IF[0].text)
{
IF[0].enabled = false;
}
}
}

If you are using UnityUI , disable EventSystem at the start of your game so your UI is not interactable.
then check Application.internetReachability enum to see if internet is avilable and if so , then make you EventSystem enabled . Something like this:

	void Awake(){
		EventSystem.current.enabled = false;
		
		TryConnectToInternet();
	}
	
	void TryConnectToInternet(){
		if(Application.internetReachability == NetworkReachability.NotReachable){
			//Display no intenet connection message and a try again  
                       //button with click event : TryConnectToInternet 
		}
		else
		{
			EventSystem.current.enabled = true;
		}
	}