- Home /
Question by
vvkkumar06 · May 27, 2014 at 03:38 PM ·
texture2dresizescreen.widthscreen.heightguibox
How to resize a normal image then apply as a texture for GUI.Box()?
What I am doing here is actually I have declared a public variable as a Texture2D now I am resizing it to screen width and screen height as I have a gui box of same size.
var bgImage : Texture2D;
function start(){
bgImage.Resize(Screen.width,Screen.height);
bgImage.Apply();
}
Then I am directly using this "bgImage" for guibox which is also of screen.width and screen.height but its not working.
I checked import setting of image and made Read/Write true, and then it is saying format is compressed but when I change it to any other format Image becomes white.
Comment
Your answer
Follow this Question
Related Questions
Can you tell unity to resize the Game window by a button press? 2 Answers
Screen height and width confusion 1 Answer
Android orientation issue 1 Answer
Positioning across various resolutions 0 Answers
Cutting off a GUITexture's texture 0 Answers