官术网_书友最值得收藏!

Constant Pixel Size

When a Canvas has the UI Scale Mode set to Constant Pixel Size, every item in the UI will maintain its original pixel size regardless of the size of the screen. You'll note that this is the default setting, so by default UI does not scale; you must turn the setting on for it to scale with altering screen resolutions.

When you change the UI Scale Mode to Constant Pixel Size, you will see the following properties appear within the inspector:

  • Scale Factor: This setting creates a scale multiple for all objects within the UI. For example, if you set this number to 2, everything within the UI will then double in size. If you set this number to 0.5, all items will have their size halved.
  • Reference Pixels Per Unit: This setting determines how many pixels take up a single in-game unit. When this number is set to 100, that means two objects one game unit apart from each other will be 100 pixels apart. Put another way, if two objects are at the same y--coordinate, but one object has an x-coordinate of 1 and the other has an x-coordinate of 2, they are exactly 100 pixels apart. (This property works the same way in all other modes).
主站蜘蛛池模板: 济宁市| 会理县| 大姚县| 潢川县| 通山县| 瑞安市| 宝山区| 五大连池市| 石城县| 宿松县| 平乡县| 芦山县| 临清市| 集贤县| 特克斯县| 壤塘县| 镇赉县| 衢州市| 奉节县| 南昌县| 白朗县| 江山市| 余干县| 东乡| 辰溪县| 溧水县| 来安县| 怀集县| 聂拉木县| 喀喇| 康保县| 中牟县| 张家港市| 来凤县| 竹溪县| 龙陵县| 尼勒克县| 巩留县| 女性| 延安市| 冕宁县|