- Home /
 
scaling a UI plane to match screen size
hey all, so im working on my UI for my game and i have an issue, since i want to have my UI rotating and moving around the screen, im using planes with textures on for things like the scoreboard, pause pop up menu ect. my problem is i need the plane to stay th same scale on every resolution, i also have a zoom in and out function in my game but when i zoom in, i also zoom into the UI plane, which makes it fill the screen..
i used to have guitextures until i wanted to animate the UI and i solved this then by using this function Start () {
     var DivideX= 1024/guiTexture.pixelInset.x;
     var DivideY= 600/guiTexture.pixelInset.y;
     var DivideWidth=1024/guiTexture.pixelInset.width;
     var DivideHeight=600/guiTexture.pixelInset.height;
  
     guiTexture.pixelInset = Rect(Screen.width/DivideX,Screen.height/DivideY,Screen.width/DivideWidth,Screen.height/DivideHeight);
  
 }
 
               as you can tell this wont work on my plane.. any help would be great =]
Answer by lemiwinks · Oct 20, 2013 at 12:32 PM
just a heads up to anyone who has a similar issue, i created a new camera that just renders a UI layer, and took off uilayer from the standard camera.
Your answer
 
             Follow this Question
Related Questions
Screen Resolution Scaling No Solution? 1 Answer
3D Earth - 32K Resolution 1 Answer
Preserving fine line art (variable zoom and resolutions)? 2 Answers
Sprites proportions for a HD 2D game 0 Answers