Hello,
I’m having a weird, a very weird, problem with my GUI. I have a plain black texture that fades in. That texture should always be exactly the same size as the screen. Now, I got 2 levels, in level 1 everything works perfectly, but then level 2…the GUI size gets all messed up, so does the text(same question). Everything is dragged in from a prefab.
This is my script(shortened but the essentials are there):
function Start () {
var edgeMargin = Screen.width * .01;
//making the end screen big enough
var guihelp : Rect = Rect(0, 0, Screen.width, Screen.height);
nextlvlGUI.transform.localScale = Vector3.zero;
nextlvlGUI.pixelInset = guihelp;
nextlvlGUI.pixelInset.x = nextlvlGUI.pixelInset.width / -2;
nextlvlGUI.pixelInset.y = nextlvlGUI.pixelInset.height / -2;
}
Here’s the web version of the game so far: Ball Brawl
Movement is with the mouse.