I was wondering how to change the size and placement of a button based on screen resolution. I have been working at this for awhile now and no matter what I do I can't figure it out so I'm looking to you wonderful people for help. What would I change this to?
if (GUI.Button(Rect(30, 795,120,60),skillzButton))
{
pauseCounter = 1;
}
Now to have a button always centered, use it like this:
GUI.Button(Rect(Screen.width/2 - x, Screen.height/2 - y, x, y)
I think you get the idea. Using width and height you can make it appear at the same place, always.
The thing about this is, we don't want it cenetered, and when we try to use the -x's and -y's it looks completely different depending on the android device we are using.
Centered was just an example, using this you can make sure its always at for instance 90% width and 10%height. If you then also make it bigger/smaller based on screen size it will always look the same.
The thing about this is, we don't want it cenetered, and when we try to use the -x's and -y's it looks completely different depending on the android device we are using.
– anon68310666Centered was just an example, using this you can make sure its always at for instance 90% width and 10%height. If you then also make it bigger/smaller based on screen size it will always look the same.
– anon73820239I didn't even think of that. Thank you very much!
– anon68310666