9

I have a 2D game set to 1080p pixel size (so each unit equals 1 pixel) and I have added a canvas to my scene. However the canvas fills only about 1/8th of the screen and is also not central either. All the canvas size and position settings are locked so I cant move it or resize it. The canvas itself does reflect the screen (ie if I put text in the top right corner it appears correctly) but the size makes it hard to judge where best to position the elements).

How do I get the canvas to fill my scene?

Image showing canvas in my scene

enter image description here

3
  • Can you add a snapshot of your Canvas' inspector? Maybe it helps to understand problem Commented Sep 2, 2015 at 9:57
  • I have added a capture of the inspector Commented Sep 2, 2015 at 19:38
  • add a shot of the rendered frame window please Commented Sep 2, 2015 at 19:41

2 Answers 2

14

On your canvas, set the Canvas Scaler component's Ui Scale Mode to Scale with Screen Size. Then you can define a Reference Resolution of 1080p, i.e. 1920 x 1080.

EDIT: To see the canvas fit into the camera's size in the scene, change the Canvas component's Render Mode to Screen Space - Camera, and drag the camera from the hierarchy to it.
(check this video)

Sign up to request clarification or add additional context in comments.

3 Comments

I made the changes to the settings you suggested but nothing appears to have happened. I have posted an image of the inspector above.
@coolblue2000 Answer edited to include fitting the canvas inside the scene camera's size.
It did not work at all
0

See this image

By default the image position in rect transformation (e.g left top etc) have some value make it 0 for everything and for pivot as well, worked for me;

P.S. render mode for canvas should be screen space - overlay

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.