im rewriting my GUI button script to make each button position resolution independent or similiar.
In order to position the buttons in the left part of the screen i divide the the screen.width with a number. To position it on the right side of the middle part of the screen, i do the opposite by decrese the size of the screen width with the size of the GUI button (100) multiplied with two.
private var positionX = (Screen.width) - (dimensionsX *2);
private var positionY = (Screen.height / 1.2) - (dimensionsY / 2);
When i deactivate “maximize on play”, and press play and then pause and activate “maximize on play”, and press pause again, i can see the gui button at the right part of the screen. Obviously cause the button cordinates were set according to the smaller screen.
But no mather how mutch i multiply the dimensionX of the GUI button wont change its x position. What am i doing wrong? :shock:
An alternativ is to do like this, but that doesnt work well either. Now the problem is that nomather what value i multiple with dimensionX, and posiiton of the button remains the same.