스프라이트 마스크(Sprite Masks)는 스프라이트 또는 스프라이트 그룹을 숨기거나 보여주는 데 사용됩니다. 스프라이트 마스크는 Sprite Renderer 컴포넌트를 사용하는 오브젝트에만 영향을 미칩니다.
스프라이트 마스크를 생성하려면, 메인 메뉴에서 GameObject > 2D Object > Sprite Mask를 선택합니다.
프로퍼티 | 기능 |
---|---|
Sprite | 마스크로 사용되는 스프라이트입니다. |
Alpha Cutoff | 알파에 투명 영역과 불투명한 영역이 혼합되어 있는 경우, 어떤 영역이 표시될 지를 컷오프포인트를 통해 수동으로 지정할 수 있습니다. 알파 컷오프 슬라이더를 조정하여 이 컷오프를 변경합니다. |
Range Start | Range Start은 마스크가 마스킹을 시작하는 Sorting Layer입니다. |
Sorting Layer | 마스크의 Sorting Layer입니다. |
Order in Layer | Sorting Layer에서의 순서입니다. |
Range End | |
Mask All | 기본적으로 마스크는 뒤에 있는 모든 정렬 레이어에 영향을 미칩니다(낮은 정렬 순서). |
Custom | 범위 끝은 커스텀 Sorting Layer 및 Order in Layer로 설정될 수 있습니다. |
스프라이트 마스크 게임 오브젝트 자체는 씬에서 보이지 않으며, 스프라이트와의 최종 상호 작용만이 표시됩니다. 씬에서 스프라이트 마스크를 보려면, 씬 메뉴에서 스프라이트 마스크 옵션을 선택합니다.
스프라이트 마스크는 항상 효력이 있습니다. 스프라이트 마스크에 영향을 받는 스프라이트는 스프라이트 렌더러에서 마스크 상호 작용을 설정해야 합니다.
기본적으로 스프라이트 마스크는 Mask Interaction이 Visible Under Mask 또는 Not Visible Under Mask로 설정된 씬에 있는 모든 스프라이트에 영향을 줍니다. 그러나 대부분의 경우 사용자는 마스크가 특정 스프라이트 또는 스프라이트 그룹에만 영향을 주기를 원합니다.
마스크가 특정 스프라이트와 상호 작용하도록 하는 하나의 메서드는 Sorting Group 컴포넌트를 사용하는 것입니다.
마스크 효과를 제어하는 다른 메서드는 Sprite Mask의 Custom Range 설정을 사용하는 것입니다.
Range Start 및 Range End는 Sorting Layer 또는 Order in Layer에 기반하여 선택적으로 스프라이트를 마스킹하는 기능을 제공합니다.
2017–05–26 페이지 게시됨
Unity 2017.1의 새로운 기능NewIn20171
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.