4.6 - Sceneview GUI.Button not working correctly

I’ve been working in 4.6 for a little while however have come across a problem as I went to use GUI.Button within a custom editor.

Rather than the standard GUI button, it looks like it’s attempting to pull off a new unity UI. On top of this, it’s only rendering in the top right quarter of my scene view.

[34882-uibug.png*|34882]

Here you can see where I’m trying to draw buttons where each of those objects are, they appear as if they’re the new UI.

On top of that, it’s not taking in screen coordinates, instead it’s treating them as world coordinates.

for (int i = 0; i < allReactions.Count; i++)
{
	Vector3 screenPos = allReactions*.transform.position;*
  • if (GUI.Button(new Rect(screenPos.x - 10, screenPos.y - 10, 20, 20), “Connect”))*
  • {*
  • }*
    }
    Thanks for any help. I’m pretty sure this is a bug but I’d thought I’d ask here in case I am missing something.

Surrounding the loop with Handles.BeginGUI() and Handles.EndGUI() solves this issue.