Tilemap Renderer コンポーネントはシーンの タイルマップ をレンダリングします。Unity は、デフォルトで Tilemap Renderer (タイルマップレンダラー) がアタッチされた Tilemap を作成します。タイルマップレンダラーでは以下のことが可能です。
The Render Mode affects the sorting of Tilemap Sprites when rendered.
Chunk モードは Tilemap Renderer のデフォルトレンダリングモードです。
When set to Chunk Mode, the Tilemap Renderer handles Sprites on a Tilemap in batches and renders them together. They’re treated as a single sort item when sorted in the 2D Transparent Queue. While this reduces draw calls, other renderers can’t render between any part of the Tilemap, preventing other rendered Sprites from interweaving with Tilemap Sprites.
In Chunk Mode, the Tilemap Renderer isn’t able to sort Tiles from multiple textures individually and doesn’t render the tile sprites consistently (refer to the example below).
この問題を解決するには、タイルマップを構成するすべての個々のスプライトを 1 つの スプライトアトラス にまとめます。これを行うには、以下の通りです。
Assets メニューから スプライトアトラス を作成します (Asset > Create > Sprite Atlas)。
スプライトをスプライトアトラスに追加するには、アトラスの Inspector ウィンドウの Objects for Packing リストにドラッグします。
Pack Preview をクリックします。 Unity は、再生モードの間にスプライトをスプライトアトラスにまとめ、正しくソートしレンダリングします。これは、再生モードのエディターでのみ表示されます。
Individual Mode では、タイルマップレンダラーは、スプライトレンダラー や メッシュレンダラー など、シーン内の他のレンダラーを考慮して、タイルマップのスプライトをソートしレンダリングします。他のレンダラーがタイルマップ上のスプライトとオブジェクトと相互作用する場合は、このモードを使用します。
In this mode, the Tilemap Renderer sorts sprites based on their position on the Tilemap and the sorting properties set in the Tilemap Renderer. For example, this allows a character sprite to go in-between obstacle sprites (refer to the example below).
Using the same example in Chunk Mode, character sprites might get hidden behind ground sprites:
Using Individual Mode might reduce performance as there is more overhead when rendering each sprite individually on the Tilemap.
To sort and render tile sprites on an Isometric Z as Y Tilemap, set the Transparency Sort Axis to a Custom Axis. To do this:
Refer to the page on Creating an Isometric Tilemap for more information about the Transparency Sort Axis settings.
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.