Upon a user registering the inputfield should autofill out the email address currently stored in user prefs. I have this working fine.
My problem is outputting this variable into the inputfield in the main page. Any help here would be great if anyone has managed it before. Every time I try to get the text of the inputfield it returns a null ref.
GameObject inputFieldGo = GameObject.Find("email");
InputField inputFieldCo = inputFieldGo.GetComponent<InputField>();
inputFieldCo.text = "hello";
NullReferenceException: Object reference not set to an instance of an object firstRun.Start () (at Assets/Scripts/init/firstRun.cs:31)