Hey,
I am in the process of learning unity and following the tutorials on the forums, the issue that I am having and I am following the video tutorial to the exact letter but when I click the play button the “Menu” is not there?
Video Tutorial: - http://www.youtube.com/watch?v=G_YJLzv3-gA
Time in the video.
8m 31sec for the Code.
9m 1 sec for the GUI
My code is as follows: -
using UnityEngine;
using System.Collections;
public class myGui : MonoBehaviour {
void start (){
}
void Update(){
}
void OnGui(){
//Make a Background Button
GUI.Box(new Rect(10, 10, 100, 200), “Menu”);
}
}
It is probably some basic error and when I build it I don’t get no errors back.
any help would be appreciated.
Did you add myGui script to any object?
And ‘start’ method should begin with big letter ‘Start’
I added it to the camera the exact same thing as the guy in the tutorial and still no Gui when I click play for the modification on “Start”.
You spelled OnGUI incorrectly: OnGui.
What you should use is:
void OnGUI() {
}
Yeah, this is a problem, because UT doesn’t follow the C# coding convention.
What I mean is - note the naming in System.Xml etc. - thought XML is the abbreviation, it is written in camel case. So should GUI be written as Gui (I’m doing so with eDriven.Gui :)).
Thanks, Syntax errors are going to be the main issue for me it seems its sorted now.
Just remember that EVERYTHING can break your script, This means as simple as being Case Sensitive. Over time you will learn that its a little frustrating as you know that your code is “right” just not “EXACT”. One of the main reasons i notice scripts not working is simply they forget to assign it to the object. I am also just learning but i have a great background in Windows Application Development, However i am used to VB .Net. Anyways, I am sure this community will be helpful in your learning Unity, I am counting on it for myself also 
Happy Debugging,
Poppabear