GUI screen position is driving me crazy

I can’t for the life of me figure this out! What I want is for the GUI screen position to work the way I want it to. :?

It’s very hard to describe but basically I want a button near the bottom of the screen (center width), and have it move like you would expect according to the screen ratio. Unfortunately, every combination of the screen width/height doesn’t do what I want.

Avert Fate has something similar to what I’m trying to achieve, but I don’t know the code for it. Does anyone know if there’s a way to have the gui code for the game? Or tell me how the buttons in the game stay at their specific position at the bottom of the screen regardless of the resolution?

My button seems to go “under” the screen when the res is small, and is in the middle of the screen almost when the res is larger. What gives?

Any help is appreciated. :wink:

Position the button in relation to the bottom of the screen instead of the top and its done

from your description it sounds like you by error position it in relation to the top

so if you use 0 + your position you instead would use Screen.width / Screen.height - the desired distance to that border - width / height of your button

Got it working! It was so simple. All I needed to do was use Screen.height and subtract a number from it and somehow it miraculously worked exactly how I wanted it. :smile:

Thanks for your input though Dreamora. :wink: