Camera ratio---Help(a nearly complete game fail)!

Alright… I go to bed defeated… First I messed up the UI…Badly… after resetting the the canvas reference ratio to proper, then realigning everything, I got my UI looking somewhat proper However it looks **** in the preview window in the engine. Now the game is playable… but the screen ratio is all off. If anyone could take a quick peek and let me know what is going on, Id be most obliged. I am sure it is something simple…Also I want to apologize for not being more active this lesson, in terms of posting updates. I try to fit in a couple hours a day and love following everyone else’s progress. This lesson has seen me leaps an bounds(bug thanks rick, you’re the man)… I am almost done with the game and even took the time to create all assets including the music and sounds in ableton(except the background) just need the camera area to clip to the actual playing field…Also I have a bunch more I want to put in, I just refuse to move forward until I get this bug nipped… Cheers, and thanks…Erik
(Also if you are just looking to try a rendition of the lesson’s material that’s pretty and fun, check it out!)

Hi Eric,

Firstly, nice assets!

Regarding the issue that you mention above is, are you referring to this?

image

Assuming so, this is because your target resolution (Edit / Build Settings / Player Settings / Resolution and Appearance) are using a different aspect ratio than that to which you have designed your game.

From memory, Rick asks you to set the Game view to 9:16, if you look at the default target resolution in the build settings;

image

So, the blue bars you see down the side of the space background in your game are the additional camera width that you don’t really want, they are blue because this is the background colour of the camera in your scene.

If this isn’t what you were referring to please let me know.

Hope this helps :slight_smile:

Heres my settings right now… I wonder if it has something to do with the locked low resolution aspect ratio on that drop down(cant find a way to unfreeze it for the life of me, should I switch the default canvas width and height to something else?.. Feeling kind of foolish for missing a simple instruction… Thank you for your help, I was seriously losing sleep over this

Also yes, you nailed it… that is exactly whats going wrong…

Still Geting the same issue after switching the default canvas ratio to 900w and 1600w… I assume at this point I will probably have to rebuild the game from scratch…scene wise? I assume I can keep the assets, scripts and what not but a a full rebuild might be necessary…if so then a I guess its one of those excellent learning experiences…
Cheers,
E

Hi Erik,

The settings in the Game view are just going to change how you see the game within Unity, not on the final build. The settings to change here would be those indicated above within the Build Settings, if you are wanting a 9:16 ratio then perhaps consider using width : 540 height : 960 and create another WebGL build and see what it looks like.

Hope this helps :slight_smile:

1 Like

Dear god I really needed a win today… and this delivered! I could seriously kiss you right now!!!(But I won’t… promise) I just want to say thank you… I know it seems like a small issue to you and I know this isn’t a college course where students pay to be babysat , but its little wins like this that help me motivate to put love and energy into these projects, cheers man, and thank you for your work!
E

1 Like

Hi Erik,

Thank you for those kind words and I’m glad to hear you can move forward again with the course now :slight_smile:

Virtual man-hugs received and appreciated :wink:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms