- Home /
onGui not getting called every frame?
So I'm trying to understand why both onGui() and Update() are not getting called every second. The code is just a basic example to illustrate my point.
In the following code, shouldn't I be receiving messages in the console multiple times a second? But instead, I only receive a message in the console 1 time for each function.
function OnGUI() { GUI.Box (Rect(50, 50, 50, 50), "Box"); print( "onGui start..." ); }
function Update( ) { print( "Update..." ); }
Answer by Sebas · Apr 11, 2010 at 11:48 PM
It should get called once every frame. Did you click on "collapse" in your Console? This will display similar Console entries only once and hide the rest. Try clicking on collapse to disable it and see what happens.
Answer by bingomanatee · Jul 30, 2011 at 03:19 PM
the "Editor log" is not the same as the console! apparently in the latest build they broke the editor dialog out into its own creature.
Your answer
Follow this Question
Related Questions
Simple quest system: from Update function to OnGUI? (javascript) 0 Answers
Bool returns different values in Update and OnGUI 1 Answer
Variables in GUI not updating/changing? (javascript) 1 Answer
Update the GUI when string changes 2 Answers
MonoBehaviour Update() performance vs handling updates in a single UpdateManager script 0 Answers