Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

umm/canvas_resizer

Repository files navigation

Canvas Resizer

What

  • Automatic resize Canvas by screen resolution

Installation

With Unity Package Manager

upm add package dev.upm-packages.canvas-resizer

Note: 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"
      ]
    }
  ]
}

Any other else (classical umm style)

yarn add "umm/canvas_resizer#^1.0.0"

Usage

Parameters

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.

License

Copyright (c) 2017 Tetsuya Mori

Released under the MIT license, see LICENSE.txt