Hello Guest

Author Topic: Game View cropping top and bottom  (Read 9282 times)

Gooms9

  • Newbie
  • *
  • Posts: 3
    • View Profile
Game View cropping top and bottom
« on: January 26, 2012, 09:42:59 pm »
First!

Sorry, couldn't resist :). I'm targeting the iPad landscape mode, so I've got my camera set up with ortho size of 1, and my sprite collection set up with a target size of 768 (iPad landscape height). When I place a sprite in my scene that is 1024x768, it gets cropped at the top and bottom in the game view. The texture looks fine when I run it on my iPad, but just in the game view it appears cropped at the top and bottom. Any ideas? If I make my cameras field of view exactly 1.2 (without changing my sprite collection back from 1) the game view appears correctly again. But I'm guessing it wouldn't look right on the iPad. I'm using orthographic. Can it be set up so that the camera looks correct in both game view, and on my iPad?

Thanks,


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Game View cropping top and bottom
« Reply #1 on: January 26, 2012, 09:48:58 pm »
Hi Goom! Thanks for posting here.

I believe this is a bug (or "feature", I'm not sure) in Unity. This happens when you set the resolution to "iPad Wide (1024x768)", and the window can't display 1024x768 pixels. What this happens, Unity will start compressing the viewport vertically, which results in gaps appearing.

If your display is unable to display the window in that resolution, simply set the game window to "iPad Wide (4:3)" instead of the explicit resolution. The issue doesn't occur when running in this mode.

Gooms9

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Game View cropping top and bottom
« Reply #2 on: January 26, 2012, 09:56:30 pm »
Hmmm, I don't think this was the case, as I have a 24 inch monitor and I was running the app in a maximized game view and I was still seeing the cropping issue. I just fired the project up at work though, and I'm not seeing any cropping there, so maybe my home computer is misconfigured or something, or maybe it was just some faulty Library files. I'll try clearing out the project settings when I get home and firing it back up to see if it fixes itself.