타일맵 콜라이더 2D(Tilemap Collider 2D) 컴포넌트를 Tilemap 게임 오브젝트에 추가하여 해당하는 타일맵 컴포넌트에 설정된 각 타일 을 위한 콜라이더 모양을 생성할 수 있습니다. 타일맵 컴포넌트에 타일을 추가하거나 타일맵 컴포넌트에서 타일을 제거하면 타일맵 콜라이더 2D는 LateUpdate
중 콜라이더 모양을 업데이트합니다.
타일맵의 각 타일을 위해 생성된 콜라이더 모양은 타일 에셋에 설정된 해당 콜라이더 타입에 따라 달라집니다.
Collider Type | 기능 |
---|---|
None | Tilemap Collider 2D 컴포넌트는 이 타일에 대한 콜라이더 모양을 생성하지 않습니다. |
Sprite | Tilemap Collider 2D 컴포넌트는 타일에 할당된 스프라이트에 기반하여 콜라이더 모양을 생성합니다. 콜라이더 모양은 스프라이트에 설정된 커스텀 물리 모양과 동일하게 생성하거나, 스프라이트의 아웃라인에서 대략적으로 추정하여 생성할 수 있습니다. |
Grid | Tilemap Collider 2D 컴포넌트는 선택한 Grid 컴포넌트의 셀 레이아웃에 의해 결정되는 그리드 셀의 모양에 기반하여 콜라이더 모양을 생성합니다. |
이 콜라이더를 Composite Collider 2D 컴포넌트와 함께 사용하십시오. 근접한 타일의 콜라이더 모양을 합성하려면 두 모양을 같은 타일맵에 추가합니다. 그러면 근접한 타일의 콜라이더 모양 사이에 있는 코너와 가장자리가 제거됩니다.
그러면 물리 업데이트 시 사용되는 개별 콜라이더 모양의 수도 감소하므로 타일맵 콜라이더의 성능도 개선되며, 이로 인해 필요한 계산의 양도 감소합니다.
프로퍼티 | 기능 |
---|---|
Material | 마찰이나 바운스와 같은 충돌 프로퍼티를 결정하는 물리 머티리얼입니다. |
Is Trigger | Tilemap Collider 2D가 트리거로 동작하도록 하려면 이 체크박스를 선택합니다. |
Used by Composite | 연결된 Composite Collider 2D 가 이 콜라이더를 사용하게 하려면 이 체크박스를 선택합니다. Used by Composite 이 활성화되면 Offset을 제외한 모든 프로퍼티를 더 이상 Tilemap Collider 2D 컴포넌트에서 사용할 수 없게 되며, 프로퍼티가 연결된 Composite Collider 2D 컴포넌트에 의해 제어됩니다. |
Used by Effector | 연결된 Effectors 2D가 Tilemap Collider 2D를 사용하게 하려면 이 체크박스를 선택합니다. |
Offset | Tilemap Collider 2D 지오메트리의 로컬 오프셋입니다. |
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.