Unity 4.6 GUI at runtime!

Hi!
How can i add the new GUI at runtime?
I need something like the old GUI system at OnGUI() method
(GUI.Button(new Rect(10, 10, 10, 10), “Button”):wink:
How can i do that?

All new GUI elements are components so you will need to instantiate game objects and either add those components or premake prefabs and instantiate those.

But it’s probably more efficient to make entire screens or sections that you will instantiate instead of separate elements.