Reputation: 31
In Unity3D I can't scale the game properly to remove the black bar.
I've added pictures for reference:
EDIT: I need to make the canvas scale to the whole screen instead of only a part of the screen.
Upvotes: 3
Views: 1026
Reputation: 61
Set the screen resolution manually in the Start()
of your code:
Screen.SetResolution(x, y, true)
Upvotes: 0
Reputation: 72
Try to dynamically spawn the background or image by using Scale To Fit lots of Unity Documentation to help with that so when compiled you can tend to get a stronger and fuller picture this may help with a general sizing issue
Upvotes: 0
Reputation: 650
You have to set anchors of Image to each corner of your canvas display so It can scale accordingly.
Upvotes: 3
Reputation: 31
Just change the aspect ratio from 'free aspect' to '16:9' or manually enter an aspect ratio that suits your needs.
Cheers.
Upvotes: 0
Reputation: 2414
You should first set your game viewport to simulate the resolution and screen size of whatever you're building for. Change Free Aspect to the appropriate aspect ratio or manually add a new resolution.
Also, I believe the match mode you want for your Canvas Scaler is Match Width or Height.
Upvotes: 4