Unity에서 프리팹이 작동하는 방식과 비슷하게, 기존 UI 문서(UXML)를 현재 UI 문서 내에서 템플릿으로 인스턴스화하여 현재 UI 문서 내 템플릿 인스턴스로 만들 수 있습니다. UI 문서를 템플릿으로 사용하려면 다음을 수행하십시오.
.uxml
)을 찾습니다.템플릿 인스턴스가 TemplateContainer
타입의 노멀 요소처럼 Hierarchy에 표시됩니다. .uxml
파일의 이름이 템플릿 인스턴스 이름의 오른쪽에 회색 글꼴로 표시됩니다. 템플릿 인스턴스를 펼치면 인스턴스의 내부 계층 구조를 볼 수 있습니다. 요소를 사용한 작업에서 설명한 이 내부 계층 구조는 읽기 전용이며, 참조용으로만 표시됩니다. 이 계층 구조를 편집하려면 원본 UI 문서를 편집해야 합니다.
UI 빌더에서는 세 가지 방법으로 템플릿 인스턴스로 사용된 원본 UI 문서를 편집할 수 있습니다. 이러한 옵션에 액세스하려면 템플릿 인스턴스를 마우스 오른쪽 버튼으로 클릭하고 다음을 선택하십시오.
위 (2) 및 (3)의 경우에는 이 상태를 표시하는 이동 경로가 Viewport 위에 표시됩니다. 원본 템플릿 인스턴스 내에서 이 작업을 템플릿 인스턴스에 대해 재귀적으로 반복할 수 있습니다. 부모 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.