- Home /
This question was
closed Mar 24, 2013 at 08:12 PM by
robertbu for the following reason:
Duplicate Question
Making a button's placement independent of resolution
I am extremely new to Unity.
I have a button which I created using Gui.button(...) function but want to place it slightly to the left of the middle of the screen, independent of screen resolution. So I want the button's right side to be touching the center y-axis of the screen and the button to be resting on the x-axis.
How can I do this?
E.g.
Gui.button(Rect (20,40,80,20), "Level 1"))
is my button, should I set the x position of th button to
x = Screen.Width/2 - (80-20)/2
Thanks.
Comment
Duplicate of this question:
http://answers.unity3d.com/questions/423869/making-a-buttons-placement-independent-of-resoluti.html
Follow this Question
Related Questions
Screen Sizes - HUD - Button Layout - Camera. 0 Answers
Clicking Trigger 1 Answer
GUI button in middle of screen 2 Answers
How do you auto scale the space between Gui Buttons? 1 Answer