UI를 렌더링하고 게임 뷰에서 사용자의 입력에 반응하려면 UI 문서 에셋을 UI Document 컴포넌트로 패널 설정 에셋에 연결합니다.
모든 UI Document 컴포넌트는 UI를 정의하는 UI 문서 에셋(’.uxml` 파일)과 이를 렌더링하는 패널 설정 에셋을 참조합니다.하나의 패널 설정 에셋에 둘 이상의 UI 문서 에셋을 연결할 수 있습니다.
패널 설정 에셋은 씬의 패널을 정의합니다.패널은 UI 계층 구조가 첨부되는 루트 시각 요소를 제공하며, 런타임에 씬에서 UI를 그립니다.패널 설정 에셋을 구성하는 방법에 따라 UI가 렌더링되는 방식이 결정됩니다.또한 UI가 입력에 반응하는 방식도 결정합니다.예를 들어, 시각적으로 전면에 있는 패널이 시각적으로 후면에 있는 패널보다 먼저 사용자의 클릭을 가로챌 수 있습니다.
패널 설정 에셋을 설정하여 다음을 수행할 수 있습니다.
패널을 설정하려면:
패널은 둘 이상의 UI 문서 에셋에서 UI를 표시할 수 있습니다.각 UI 문서에는 UI 문서 렌더링 순서를 설정하는 Sort Order 프로퍼티가 있습니다.
패널에 둘 이상의 UI 문서 에셋을 연결하려면:
UI를 호스팅할 게임 오브젝트를 선택하거나 생성합니다.
Component > UI Toolkit > UI Document를 선택하여 UI Document 컴포넌트를 추가합니다.
UIDocument의 인스펙터(Inspector) 창에서 다음을 수행합니다.
Panel Settings를 패널 설정 에셋으로 설정하여 UI를 표시합니다.
Source Asset을 표시하려는 UI가 포함된 UI 문서(.uxml
파일) 에셋으로 설정합니다.
*Sort Order를 설정합니다.숫자가 작은 UI 문서가 먼저 렌더링됩니다.
각 UI 문서 에셋에 대해 이 과정을 반복합니다.
참고:동일한 패널 설정 에셋에 여러 UI 문서가 첨부되어 있는 경우 이러한 모든 문서에는 공통된 포커스 내비게이션 컨텍스트가 있습니다.패널 설정이 서로 다른 경우, 나란히 배열되어 있어도 내비게이션이 자동으로 다른 패널로 이동하지 않습니다.
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.