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