unity3.x bug ? Handles.BeginGUI(rect) not work is it a bug ?

Handles.BeginGUI(); is work well but Handles.BeginGUI(rect);
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced (type:2)
UnityEngine.GUIUtility:EndGUI(Int32, Int32, IDList)
code

@CustomEditor(UIEditor)
class _GUI extends Editor
{
	function OnSceneGUI()
	{
		Handles.BeginGUI(Rect(10.0,10.0,100.0,200.0));
			GUILayout.Box("hello world");
		Handles.EndGUI();
	}
}

This happened on my machine too - I’ve filed a bug report.

thx

@andeeee do you have a link to your bug report? This still seems to be an issue 2 years later

Same here, still bugged. Seem BeginGUI don’t like being given a Rect().
Here is a workaround.

Handles.BeginGUI();
GUILayout.BeginArea(new Rect(Screen.width - 100, Screen.height - 80, 90, 50));
// ...
GUILayout.EndArea();
Handles.EndGUI();