- Automatic resize Canvas by screen resolution
upm add package dev.upm-packages.canvas-resizerNote: upm command is provided by this repository.
You can also edit Packages/manifest.json directly.
{
"dependencies": {
// (snip)
"dev.upm-packages.canvas-resizer": "[latest version]",
// (snip)
},
"scopedRegistries": [
{
"name": "Unofficial Unity Package Manager Registry",
"url": "https://upm-packages.dev",
"scopes": [
"dev.upm-packages"
]
}
]
}yarn add "umm/canvas_resizer#^1.0.0"- Attach
CanvasResizercomponent into Gameobject what attached Canvas and CanvasScaler.
| Name | Type | Description |
|---|---|---|
| Standard Resolution | Vector2 | Resolution for determining whether to fit to vertically or horizontally. |
| Minimum Resolution | Vector2 | Minimum resolution ratio in fitted direction. |
| Maximum Resolution | Vector2 | Maximum resolution ratio in fitted direction. |
Copyright (c) 2017 Tetsuya Mori
Released under the MIT license, see LICENSE.txt