Hi, I’m attempting to use this code in my inventory system. Ran into one problem that I’m having difficulties with. I’ve got:
private var buttonGroupOffSet = Vector2((Screen.width/2) - (1024/2) + 680, Screen.height - 440 );
And as I’m playing this on a set res of 1024x576, it is essentially:
private var buttonGroupOffSet = Vector2((1024/2) - (1024/2) + 680, 576 - 440 );
But the Screen.width and height don’t work correctly within this variable for some reason, but when I hard code it in, it works. This is a problem for when I choose to go full screen. This code formula works on other GUI labels and buttons I have throughout the game.
The var is used to help create this GUI:
GUI.BeginGroup (Rect (buttonGroupOffSet.x, buttonGroupOffSet.y, 350, 310));
Any suggestions are appreciated.