- Home /
Question by
Etsamaru · Mar 29, 2015 at 07:04 PM ·
guinot workingup
Why isn't my Gui showing up at all?
I am following a tutorial, and the guy has his GUI showing up but mine is not showing up when I start the game.
public void OnGui()
{
if (!connected)
{
connectionIP = GUILayout.TextField(connectionIP);
int.TryParse(GUILayout.TextField(portNumber.ToString()), out portNumber);
if (GUILayout.Button("Connect"))
{
Network.Connect(connectionIP, portNumber);
}
if (GUILayout.Button("Host"))
{
Network.InitializeServer(4, portNumber, true);
}
}
else
{
GUILayout.Label("Connections: " + Network.connections.Length.ToString());
}
}
}
Comment
Best Answer
Answer by supernat · Mar 29, 2015 at 07:05 PM
The method should be OnGUI, not OnGui.
Thank you! I have no idea how I missed that at this point, It's usually the first thing I look for! Thank you for helping me with my hurdle, now I can continue to learn.
Your answer
Follow this Question
Related Questions
GUI.anything not working 1 Answer
Weird GUI problem 1 Answer
GUIUtility.RotateAroundPivot isn't working 3 Answers
GUI begin vertical, to go Up 1 Answer