요소에는 UXML에서 설정할 수 있는 요소별 속성이 있습니다. 이러한 속성은 생성자 또는 초기화 인자로 볼 수 있습니다. 여기에는 name
속성이 포함됩니다. 기반 VisualElement
는 name
, tooltip
, tabindex
등 모든 요소가 공유하는 몇 가지 표준 속성(모든 요소가 VisualElement
에서 상속하므로)과 함께 제공됩니다. 고급 요소 및 컨트롤에는 설정할 수 있는 속성이 더 있습니다(예: Label
로 인해 text
속성이 추가됨).
text
속성에 관하여 한 가지 유념할 점은 text
속성이 여러 줄의 텍스트를 지원한다는 것입니다. 인스펙터에서 새로운 행 문자를 추가하려면 Enter 키를 누르십시오.
표준 속성과 커스텀 속성을 포함한 모든 속성은 인스펙터 상단에 있는, 요소 타입의 이름과 같은 이름의 섹션에 표시됩니다. 예를 들어 Button
을 클릭했다면 인스펙터에서 Button이라는 이름의 섹션을 찾으십시오.
속성 섹션의 상응하는 필드를 변경하여 속성의 값을 설정할 수 있습니다. 필드 레이블 왼쪽에 필드가 굵은 글꼴로 실선과 함께 표시되는 경우, 해당 속성이 이미 설정되었으며 기본 값을 사용하지 않는다는 뜻입니다. 예를 들어 tooltip
을 빈 상태에서 test
로 설정한 다음 다시 빈 상태로 되돌리는 것은 처음부터 설정하지 않는 것과 다릅니다. 처음부터 설정하지 않은 경우 unset
이 되지만, 다시 빈 상태로 되돌린 경우 set to empty
가 됩니다. this attribute is set
은 이 요소의 UXML 텍스트에 이 속성을 a
값으로 설정하는 입력 항목이 있다는 의미입니다.
UXML 텍스트에서 언급되지 않은 속성은 not set
인 것입니다.
필드의 레이블을 마우스 오른쪽 버튼으로 클릭하고 Unset을 선택하여 속성을 설정 취소할 수 있습니다. 아무 속성 필드나 마우스 오른쪽 버튼으로 클릭하고 Unset All을 선택하여 name
속성을 포함한 모든 속성을 설정 취소할 수 있습니다.
Canvas에서 직접 변경할 수 있는 속성은 텍스트 요소의 text
속성 뿐입니다. Button
이나 Label
등의 text
속성을 변경하려면 Canvas에서 더블 클릭하십시오. 그러면 원본 텍스트와 글꼴 설정이 같은 임시 텍스트 필드가 표시됩니다.
Enter 키를 누르면 변경 사항이 적용됩니다. text
속성이 새로운 행 문자를 포함하는 경우, Shift + Enter 키를 눌러 변경 사항을 적용하십시오. 변경을 취소하려면 Esc 키를 누르십시오.
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.