- Home /
This question was
closed Sep 03, 2014 at 02:20 PM by
robertbu for the following reason:
Duplicate Question
Question by
danipisca07 · Sep 03, 2014 at 02:19 PM ·
guiguilayoutmain cameragui.label
Gui now showing up! Nothing to do D':
Hi everyone, I'm having serous trouble with the GUI, I've been searching on google for hours and in this forum too, there are a lot of person that asked that before me but not one of them solution worked for me ): (like always) so, i'm here.
I have this script attached to my main camera:
public class GuiControllerCamera : MonoBehaviour {
// Use this for initialization
void OnGui()
{
if (GUI.Button(new Rect(310, 180, 200, 30), "Restart Level"))
{
Application.LoadLevel(Application.loadedLevelName);
}
GUILayout.BeginArea(new Rect(50, 50, Screen.width / 2, Screen.height / 2));
GUILayout.BeginHorizontal();
if (GUILayout.Button("Restart Level"))
{
Application.LoadLevel(Application.loadedLevelName);
}
GUILayout.Label("Label");
GUILayout.EndHorizontal();
GUILayout.EndArea();
}
}
but in the game or in the scene during the debug the gui doesn't show up. Am i doing something wrong? 0.o Thank you in advance guys Soon (I'm in your hands! :P)
Comment