- Home /
Screen Resolution for android - texture getting cropped
Hi, I am making a 2D game for android and basically my game has a fixed background the game elements are all in front. The game elements and evrything is running fine but when I test the game in different phones with different resolution and aspect ratio, i get diffrent results. The background texture is getting cropped in many devices. I have set the camera resolution in unity to 3:2 and have made the background adjustment accordingly. Please suggest on how do i correct this issue. I have searched a lot in the forums but have not gotten into any result as yet.
Answer by getbiks · Oct 25, 2012 at 01:16 PM
ok guys.. seems no answer from you guys yet.. but i have been trying to see if i can come up with some kind of solution and incase anybody is wondering how i solve it.. here you go..
first, I had a high texture in my project.. (1280*800) as that is the max resolution i am gonna support. Next what i did was.. i calculated the aspect ratio.. and adjusted my view according to the 1280*720 view as default.. and wrote a script where in the game checks the screen width at the starting of the game.. and according to the screen width it will adjust the width of my BG. I have noticed that the camera scales according to the height of the screen.. so i dont have to adjust the height.. its just the width that is to be adjusted.. also it looks bit stretchy.. but then its fine.. also i have adjusted all the different elements which is nearer to the screen according to the screen height and width. the main game elements are fine.. as its in the centre so they dont need to be adjusted.
Your answer
Follow this Question
Related Questions
android platform 0 Answers
Problems with different Screens 0 Answers
How do I set an Android applications resolution? 4 Answers
How do you clamp a camera by mobile width? 2 Answers
How do I rotate an object on one axis to face android touch? 0 Answers