각 패널에는 요소의 포커스 순서를 정의하는 포커스 링이 있습니다. 기본적으로 요소의 포커스 순서는 시각적 요소 트리에서 DFS(뎁스 우선 검색)를 수행하여 결정됩니다. 예를 들어 아래에서 설명된 트리의 포커스 순서는 F, B, A, D, C, E, G, I, H입니다.
일부 이벤트는 포커스 순서를 사용하여 포커스를 유지하는 요소를 정의합니다. 예를 들어 키보드 이벤트의 타겟은 포커스가 맞춰진 요소입니다.
focusable
프로퍼티를 사용하여 시각적 요소에 포커스를 둘 수 있는지 여부를 제어합니다. 기본적으로 VisualElements
에는 포커스를 둘 수 없지만, TextField
같은 일부 서브 클래스의 경우는 기본적으로 가능합니다.
tabIndex
프로퍼티를 사용하여 다음과 같이 포커스 순서를 제어하십시오(tabIndex
기본값은 0).
tabIndex
가 음수이면 요소에서 탭을 사용할 수 없습니다.tabIndex
가 0이면 요소가 포커스 링 알고리즘에서 결정된 기본 탭 순서를 유지합니다.tabIndex
가 양수이면 요소가 0 tabIndex
(tabIndex = 0
) 또는 해당 요소의 tabIndex
값보다 작은 값을 가진 다른 요소 앞에 배치됩니다.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.