The Tilemap component is a system which stores and handles Tile Assets for creating 2D levels. It transfers the required information from the Tiles placed on it to other related components such as the Tilemap Renderer and the Tilemap Collider 2D. This package is not included in the Unity Editor default installation by default, and you will need to download the 2D Tilemap Editor package via the Package Manager.
タイルマップを作成 すると、Grid コンポーネントが自動的にタイルマップの親となり、タイルマップにタイルをレイアウトする際のガイドとして機能します。
タイルマップにペイントするタイルを作成、変更、選択するには、Tile Palette (タイルパレット) (メニュー: Window > 2D > Tile Palette) とそのツールを使用します。詳細は、Tile Palette と タイルマップのペイント のドキュメントを参照してください。
プロパティ | 機能 |
---|---|
Animation Frame Rate | Unity がタイルアニメーションを再生するレート。これを増減すると、速度が該当する係数に応じて変更されます (例えば、これを 2 に設定すると、Unity は 2 倍の速度でタイルアニメーションを再生します)。 |
Color | この Tilemap 上のタイルにティント (色) として適用する色を選択します。白 (デフォルト) に設定すると、Unity はタイルを無色でレンダリングします。 |
Tile Anchor | タイルマップ上のタイルアンカーの位置をオフセットするための XYZ 軸方向の値 (セル単位) を入力します。 |
Orientation | タイルマップ上のタイルの向きを選択します。特定の面に沿ってタイルを配置する必要がある場合に使用します。 |
XY | Unity は、タイルを XY 面に沿って配置します。 |
XZ | Unity は、タイルを XZ 面に沿って配置します。 |
YX | Unity は、タイルを YX 面に沿って配置します。 |
YZ | Unity は、タイルを YZ 面に沿って配置します。 |
ZX | Unity は、タイルを ZX 面に沿って配置します。 |
ZY | Unity は、タイルを ZY 面に沿って配置します。 |
Custom | これを選択すると、以下のカスタムの方向設定が可能になります。 |
Offset | カスタムオリエンテーションの位置オフセットを設定します。このオプションはデフォルトでは無効になっており、Tilemap の Orientation を Custom に設定すると有効になります。 |
Rotation | カスタムオリエンテーションの回転を設定します。このオプションはデフォルトでは無効になっており、Tilemap の Orientation を Custom に設定すると有効になります。 |
Scale | カスタムオリエンテーションのスケールを設定します。このオプションは、デフォルトでは無効になっており、Tilemap の Orientation を Custom に設定すると有効になります。 |
Info | Expand this to show the Assets used in the Tilemap. |
Tiles | Shows a list of Tile Assets used in the Tilemap. |
Sprites | Shows a list of Sprites used in the Tilemap. |
GitHub の 2D Extras から Tile と Brush のスクリプトをダウンロードできます。これらのプログラム記述されたゲームオブジェクトを使ったサンプルプロジェクトは 2D Techdemos の Github リポジトリにあります。さまざまなスクリプトと使用法の説明は、各リポジトリの README.md を参照してください。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.