1
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 5 years have passed since last update.

最速! Unity Scroll View 作成3ステップ

Last updated at Posted at 2019-12-26

いつもuGUIのScroll View使う時使い方思い出すのにちょっと時間かかるので、自分のメモ用に記事にしておきます。

例としてこんなの作ります。今回はVertical操作は消して、Horizontalのみの操作とします。
ezgif.com-video-to-gif.gif

STEP 1

[Scroll View]をCanvas下に作成。
スクリーンショット 2019-12-26 23.54.45.png

STEP 2

[Scroll View]->[Viewport]->[Content]に

  1. Horizontal Layout Groupコンポーネントをアタッチ
  2. Content Size Filterコンポーネントをアタッチ

コンポーネントの設定はご自由に
スクリーンショット 2019-12-27 0.02.00.png

STEP 3

  1. Step2のContent下に並べるobjectを入れる。
  2. objectにはLayout Elementコンポーネントをアタッチして、Preferred Widthなどを設定
スクリーンショット 2019-12-27 0.02.09.png

以上です。

1
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
1
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?