- Home /
Question by
moghes · Apr 04, 2013 at 12:30 PM ·
resolutionguitexturepixelinset
Can't get a full screen background(guiTexture).
Hello,
I need to have a fullScreen screen, and a background image.
The game will be played on a fullHD screen. I have my background image (1920x1080), my guitexture position (0,0,0)
and pixelinset values as:
backgroundGUITexture.pixelInset.width = Screen.width;
backgroundGUITexture.pixelInset.height = Screen.height;
backgroundGUITexture.pixelInset.x = 0;
backgroundGUITexture.pixelInset.y = 0;
well its simple as that, but I get this (check the attachment). As you see the blue(unity default background) appears on the top and right. What might the reason be?
img.jpg
(82.6 kB)
Comment
maybe it's not stretching your texture but strange because I think than it would have to be gray not blue
@sdgd how does it stretch my texture or what might be the reason?
Best Answer
Answer by moghes · Apr 04, 2013 at 01:17 PM
Well got to a solution :)
instead of:
backgroundGUITexture.pixelInset.width = Screen.width;
backgroundGUITexture.pixelInset.height = Screen.height;
I did put:
backgroundGUITexture.pixelInset.width = Screen.currentResolution.width;
backgroundGUITexture.pixelInset.height = Screen.currentResolution.height;
Your answer
![](https://koobas.hobune.stream/wayback/20220613095658im_/https://answers.unity.com/themes/thub/images/avi.jpg)