- Home /
screen resolution and canvas UI
I noticed when created my canvas UI's (ex. buttons, sliders, etc.) and then manually adjusted the screen size. The UI's doesn't scale properly. How do I apply a fixed screen resolution, where the UI's scales accordingly?
Answer by team_eden · Jan 27, 2015 at 05:37 PM
Add to your Canvas a component type Canvas Renderer, and set the resolution manually. This will scale the way you describe when done properly. You need to reference the unity docs regarding UI.Canvas http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-canvas and here http://docs.unity3d.com/ScriptReference/UI.CanvasScaler.html
Good luck
When I went to file > build settings > player settings and change the default resolution of the web player to 1024 x 768 and build and run. The web player is automatically adjusting itself to a square resolution. What's going on?
Unity allows the user to set a default resolution unless you disable the front end loader. You should anticipate that your users will use basically any screen size, and adjust accordingly.
Check the html side of your webplayer, and make sure you have not conformed the java/applet frame somehow. Check your canvas scaler settings, also check that our game output display has been set to 1024x768, otherwise it is You who has been designing in the wrong scale! (>.<) All the best!