how do you center a button

what is the best way to put a gui button in the center of the screen?

hi

you can use screen.height/width
GUI.Button(Rect(screen.width/2-25,screen.height/2-10,50,20),“Hello”);

Exactly as described above. The center of the screen is at ((Screen.width/2.0), (Screen.height/2.0)), from there you just need to adjust the actual left/top of your button by using the height/width of the button itself. Make sense?