0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

unity 画面いっぱいにUI画像をつくる

0
Posted at

Unityが「AspectRatioFitter」という便利コンポーネントを用意済み
このコンポーネントを使えばプログラミング不要で画像をスクリーンいっぱいに表示させることが可能。

UI画像を表示するためにCanvasとImageの作成
今回はUI画像を扱うため、Canvasコンポーネントを使います。

AspectRatioFitter をセットします。
Aspect Modeを Envelope Parent に設定します。

16:9の長方形画像を使う場合
Aspect Ratioには使用する画像の比率をセットする
今回は16:9の画像なので、 16 ÷ 9 をしましょう。
答えは 1.77778

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?