onGUI dont get called

hey , i have the following Problem:

The function onGUI isnt called - if i put something like Debug.Log(“WTF”); before the function is called the console say WTF but when i put it in the function theres nothing - so i guess onGIU isnt called and i dont know why

function onGUI()
{
Debug.Log(“WTF”);
GUI.Box (Rect (10,10,100,90), "Tes Menu);
}

Dont work … anyone know , why?

I am going to guess you are new. Not trying to be mean or anything but C# and JavaScript(or UnityScript. Both same thing) are case sensitive. I do not know about Boo but no one uses Boo. The problem is that the o in “onGUI” is not capitalized. If you do this, it should work.

function OnGUI()
{
    Debug.Log("WTF");
    GUI.Box (Rect (10,10,100,90), "Tes Menu);
}

The thing that is wrong is that you are using a lower case “o” instead of a uppercase “O.” Make sure every time you call that method/function, you do it like this:

C#:

void OnGUI ()
{

}

JavaScript:

function OnGUI ()
{

}

Hope this helps fur your future programming!

oh it have to be named OnGUI

Yes, it does. Try that and tell me if it works! The same rules applies with the “Update”, “Awake”, and “Start” method/functions. And if you make your own function/method, make sure that when you call it in your code somewhere else, that you include all of the capitols. Also, if I say anything that is confusing you, let me know and I will try to help you with it.