UIElements는 사용자 상호작용을 시각적 요소로 전달하는 이벤트 시스템을 포함합니다. HTML 이벤트에서 영감을 받은 UIElements 이벤트 시스템은 같은 용어와 이벤트 명명 방식을 상당수 공유합니다. UlElement 이벤트 시스템은 다음으로 구성됩니다.
EventBase
에 기반하여 계층 구조로 정렬되고 패밀리로 그룹화됩니다. 각 이벤트 패밀리는 동일 패밀리의 모든 이벤트에 대한 공통 특성을 정의하는 인터페이스를 구현합니다. 예를 들어 MouseUpEvent
, MouseDownEvent
및 기타 마우스 이벤트는 IMouseEvent
인터페이스를 구현합니다. 이 인터페이스는 각 마우스 이벤트가 포지션, 눌린 버튼, 수정자 집합, 기타 마우스 관련 이벤트 타입을 가지도록 지정합니다. 각 이벤트 패밀리와 해당 UIElement 이벤트 타입에 대한 설명은 이벤트 타입 레퍼런스를 참조하십시오.또한 이벤트를 사용하여 다른 타입의 메시지를 시각적 요소에 전달할 수도 있습니다. 예를 들어 ContextualMenuManager
는 ContextualMenuPopulateEvent
를 사용하여 항목을 컨텍스트 메뉴에 추가합니다. 빌트인 컨트롤을 참조하십시오.
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.