Utility 对象,用于构造一组对根视觉元素运行的选择规则。
UQueryBuilder_1 | 初始化 QueryBuilder。 |
Active | 选择所有激活的元素。 |
AtIndex | 方便重载,是 Build().AtIndex() 的简便方法。 |
Build | 将选择规则编译为 QueryState 对象。 |
Checked | 选择所有选中的元素。 |
Children | 选择与前面的规则匹配的元素的所有直接子元素。 |
Class | 选择具有给定类的所有元素。不要与 Type 混淆(请参阅 OfType<>())。 |
Descendents | 选择当前匹配的父级的所有子级元素。 |
Enabled | 选择所有已启用的元素。 |
First | 方便重载,是 Build().First() 的简便方法。 |
Focused | 选择所有已启用的元素。 |
ForEach | 方便重载,是 Build().ForEach() 的简便方法。 |
Hovered | 选择所有悬停的元素。 |
Last | 为方便进行了重载,是 shorthand for Build().Last() 的简便方法。 |
Name | 选择具有此名称的元素。 |
NotActive | 选择所有未激活的元素。 |
NotChecked | 选择所有未选中的元素。 |
NotEnabled | 选择所有未启用的元素。 |
NotFocused | 选择当前没有焦点的所有元素。 |
NotHovered | 选择所有未悬停的元素。 |
NotVisible | 选择所有不可见的元素。 |
OfType | 选择所有指定 Type 的元素(例如:Label、Button、ScrollView 等)。 |
ToList | 方便方法,是 Build().ToList 的简便方法。 |
Visible | 选择所有可见的元素。 |
Where | 选择满足此谓词的所有元素。 |
operator != | 比较两个 QueryBuilder 对象,如果不相等,则返回 true。 |
operator == | 比较两个 QueryBuilder 对象,如果相等,则返回 true。 |
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.