GUI and buttons

Can i make a GUI by myself and put it into a prefab, so then i can spawn it?
If yes, can it’s sizes be adjustable to screen-size?
And how can i check for button pressing not by giving GUI.Button(new rect(…)) coordinates of rectangle, but by asking for it’s name in GUI prefab?

Yes u can make a empty gameObject with a GUI script on it and make it a prefab. Yes the gui can be resized. About your last question I dont know what your asking but try looking at this for more info about working with the GUI

Have a good read at the GUI Scripting Guide found here.

http://unity3d.com/support/documentation/Components/GUI%20Scripting%20Guide.html

The GUI is defined in Script and a Script is then attached to a GameObject and the OnGUI() method called on the Script to render the GUI. So … with this in mind … you can create a Script, attached that to a Game Object and then make a Prefab out of the Game Object. However, having achieved all of this, it still isn’t cleat what it is you actually want to achieve.

‘GUI.Button(new Rect(coordinates))’ is the declaration of the button, so without it, you don’t have one. You can try to store the button in a variable and use that in an if statement, but I have no idea, if that works (it should…).

testButton = GUI.Button(new Rect(coordinates));

if(testButton) {
    //do stuff
}