用于创建新 GUI 控件的 Utility 类。
除非您从头开始创建自己的 GUI 控件,否则不应使用这些函数。
hasModalWindow | 一个全局属性;如果正在显示 ModalWindow,则为 true,否则为 false。 |
hotControl | 当前热控件的 controlID。 |
keyboardControl | 具有键盘焦点的控件的 controlID。 |
systemCopyBuffer | 获取系统剪贴板的访问权限。 |
AlignRectToDevice | 将本地空间矩形与像素网格对齐。 |
ExitGUI | 通过抛出 ExitGUIException 来将 GUI 置于这样一种状态:阻止所有后续即时模式 GUI 函数计算 GUI 循环的其余部分。 |
GetControlID | 为控件获取一个唯一的 ID。 |
GetStateObject | 从 controlID 获取状态对象。 |
GUIToScreenPoint | 将一个点从 GUI 位置转换为屏幕空间位置。 |
GUIToScreenRect | 将矩形从 GUI 位置转换到屏幕空间。 |
QueryStateObject | 从 controlID 获取一个现有的状态对象。 |
RotateAroundPivot | 让 GUI 围绕一个点旋转的 Helper 函数。 |
ScaleAroundPivot | 让 GUI 围绕一个点缩放的 Helper 函数。 |
ScreenToGUIPoint | 将一个点从屏幕空间位置转换为 GUI 位置。 |
ScreenToGUIRect | 将矩形从屏幕空间转换到 GUI 位置。 |
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.