Hey guys. Up until yesterday all my GUI code was working fine. However yesterday I updated to Unity 3.4.2f2.
Suddenly the gui code that uses a GUILayout started giving me the following error message
“ArgumentException: Getting control 0’s position in a group with only 0 controls when doing Repaint
Aborting”
So I stripped all my gui logic out and made it as basic as I possibly could. The code below still still give me the error mentioned on the “GUILayout.BeginArea()” line.
function OnGUI()
{
DrawStoryScreen();
}
function DrawStoryScreen()
{
GUILayout.BeginArea( Rect(0,0,300,300) );
GUILayout.EndArea();
}
I understand that Unity calls the OnGUI function twice per frame and that all the GUI objects that are to be rendered need to remain consistent for those 2 calls. However as you can see… the posted code is about as consistent as it gets. Any idea why it isn’t working? Thanks in advance!