Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So, I went to build a game today in a .exe, and when I build it, it doesn't show the whole viewport as it does in the unity engine itself. So the game is cut off. It does this no matter what I do.

What I see in Unity

What I get running the exe

Anyone know what's causing this?

share|improve this question
    
I'm a little confused about what went wrong in that picture. Do you have a picture of what it should look like? –  ktodisco Apr 8 '12 at 1:54

2 Answers 2

You are using "Free Aspect" for screen ratio in your game view, which essentially makes it as big as it can be. Go to "Edit->Project Settings->Player" and you should see a "Resolution and Presentation"-tag. Now select the "PC and Mac Standalone"-option and input the resolution you are planning to test it on. Then change the "Free Aspect" in the editor to "Standalone". This changes the Editor's gameview to the given resolution.

share|improve this answer
    
Thank you, this makes the editor show what the standalone will look like. So I at least have that part fixed. –  Timothy Williams Apr 10 '12 at 18:38
    
How does it now look like? Can you post new screenshots? –  Esa Apr 11 '12 at 5:25
    
It looks fine now, I pulled the camera back in the scene view, which means when looking in the scene view it seems extremely far away, but when you hit play with the resolution it zooms in to roughly right. I'm just trying to figure out what caused this in the first place, what's different about this project that wasn't in any other. –  Timothy Williams Apr 11 '12 at 14:27

The problem is that the screen ratio you see in Unity's environment depends on the size of the viewport, not the game's final resolution or ratio. If you want your game to be in widescreen you need to limit your screen resolution to 16:9 or 16:10 ratios. If I remember it correctly, it is one of the build options.

To test your game using those resolutions from Unity's environment, enable the "Maximize on play" button in your Game viewport.

share|improve this answer
    
Thanks, I'll try these out to see how they go. –  Timothy Williams Apr 9 '12 at 18:33
    
Alright, so I've tried adjusting the "Default Screen Width" and "Default Screen Height" but nothing happens. I checked the "maximize on play" box and I can now see what things will look like in the end. So I at least know what's happening, what setting do I change to make it show correctly though? –  Timothy Williams Apr 9 '12 at 20:59
    
File -> Build Settings... -> Player Settings... -> Supported aspect ratios. As Esa said, setting the game view to standalone will directly let you see things in the default resolution or the aspect ratio you desire. –  Elideb Apr 10 '12 at 17:46
    
Alright, I have the editor showing correctly now from following Esa's instructions. However, I still can't seem to get the whole view to display on any setting. If I set "Default Screen Width"/Height to 3200/1200 that shows the whole screen in the editor, however when I export it to a .exe it goes back to the way it was before. And no matter what "Supported Aspect Ratios" I select it always still displays wrong. I'm obviously not understanding something here, but I have no idea what. I've never run in to this problem before on any other projects. –  Timothy Williams Apr 10 '12 at 18:44
    
Have you tried adjusting your camera position and size? Just place in in a place where the whole scene is contained inside its frustrum (perspective) or rectangle (orthographic). –  Elideb Apr 10 '12 at 22:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.