Tilemap Renderer 컴포넌트는 씬에서 타일맵을 렌더링합니다. Unity는 기본적으로 연결된 Tilemap Renderer로 타일맵을 생성합니다. Tilemap Renderer는 다음을 수행할 수 있습니다.
Render Mode는 렌더링 시 타일맵 스프라이트의 정렬에 영향을 줍니다.
Chunk Mode는 Tilemap Renderer의 기본 렌더링 모드입니다.
Chunk Mode로 설정하면 타일맵 렌더러가 타일맵의 스프라이트가 배치 단위로 처리하여 함께 렌더링됩니다.또한 2D 투명 대기열에서 정렬 시 단일 정렬로 처리됩니다.이렇게 하면 드로우 콜의 수가 줄어들지만, 다른 렌더러가 타일맵 부분 간에 렌더링할 수 없으므로 렌더링된 다른 스프라이트가 타일맵 스프라이트와 뒤섞이지 않습니다.
Chunk Mode에서 타일맵 렌더러는 여러 텍스처의 타일을 개별적으로 정렬할 수 없으며 타일 스프라이트를 일관적으로 렌더링하지 않습니다(아래 예시 참조).
타일맵을 구성하는 개별 스프라이트를 모두 하나의 스프라이트 아틀라스로 패킹하면 이러한 문제를 해결할 수 있습니다. 이를 수행하려면 다음 단계를 따르십시오.
Asset 메뉴에서 스프라이트 아틀라스를 생성합니다(메뉴: Atlas > Create > Sprite Atlas).
Atlas의 인스펙터 창에 있는 Objects for Packing 목록에 스프라이트를 드래그하여 스프라이트 아틀라스에 스프라이트를 추가합니다.
Pack Preview를 클릭합니다. Unity는 플레이 모드에서 스프라이트를 스프라이트 아틀라스에 패킹하고 올바르게 정렬 및 렌더링합니다. 이는 플레이 모드 중에 에디터에서만 볼 수 있습니다.
Individual Mode에서는 타일맵 렌더러가 씬의 다른 렌더러(예: 스프라이트 렌더러 및 메시 렌더러)를 고려하여 타일맵의 스프라이트를 정렬 및 렌더링합니다. 다른 렌더러가 타일맵의 스프라이트 및 오브젝트와 상호작용하는 경우 이 모드를 사용하십시오.
이 모드에서 타일맵 렌더러는 타일맵상 위치 및 타일맵 렌더러에 설정된 정렬 프로퍼티에 따라 스프라이트를 정렬합니다.예를 들어 이로 인해 캐릭터 스프라이트가 장애물 스프라이트 사이에 표시될 수 있습니다(아래 예시 참조).
Chunk Mode의 동일한 예시를 사용하면 캐릭터 스프라이트가 지면 스프라이트 뒤에 숨겨질 수 있습니다.
Individual Mode를 사용하면 타일맵에서 각 스프라이트를 개별적으로 렌더링할 때 더 많은 오버헤드가 발생하여 성능이 저하될 수 있습니다.
Isometric Z as Y 타일맵에서 타일 스프라이트를 정렬하고 렌더링하려면 Transparency Sort Axis를 Custom Axis로 설정해야 합니다.이 작업을 수행하는 방법은 다음과 같습니다.
Transparency Sort Axis 설정에 대한 자세한 내용은 아이소메트릭 타일맵 만들기 페이지를 참조하십시오.
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.