Hi everybody !
Today I tried to get multiples values from differents input by using a single script. But I have a "NullReferenceException: Object reference not set to an instance of an object". So I though that I could ask your help.
So here is my script :
using UnityEngine;
using System.Collections;
[RequireComponent
(typeof(UIInput
))] [AddComponentMenu("/Scripts/MenuManager")]
public class MenuManager : MonoBehaviour {
public MenuManager instance;
public UIInput slots;
public UIInput matchname;
public string CurrentMenu;
public string MatchName = "";
public string MatchPassword = "";
public int MatchMaxPlayers = 32;
private string iptemp = "127.0.0.1";
private Vector2 ScrollLobby = Vector2.zero;
void Start(){
instance = this;
slots = GetComponent<UIInput>();
matchname = GetComponent<UIInput>();
//CurrentMenu = "Main";
}
void Update(){
MatchName = matchname.text;
int SlotNumber = int.Parse(slots.text);
MatchMaxPlayers = SlotNumber;
}
void FixedUpdate(){
instance = this;
}
}
This has been written with the Unity GUI based system so there is some thing which don't belong here but please don't care about it.
The error is on this line :
MatchName = matchname.text;
Here's a screen of my settings :
http://d.pr/i/GWZ2I hope that you could help me resolving this problem

Thank you in advance and apologize for my bad english.