8

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

4

1 回答 1

15

在画布上,将Canvas Scaler组件设置Ui Scale ModeScale with Screen Size. 然后你可以定义一个Reference Resolution1080p的,即1920 x 1080。

编辑:要查看画布适合场景中相机的大小,请将Canvas组件更改Render ModeScreen Space - Camera,然后将相机从层次结构中拖动到它。
查看此视频

于 2015-09-02T13:34:48.763 回答