UnityEngine.UIElements 中的类
/
继承自:UIElements.CommandEventBase_1
/
实现于:UnityEngine.UIElementsModule
当面板中的元素应执行命令时,此事件由编辑器发送。
另请参阅:命令事件。
commandName | 要验证或执行的命令。 |
bubbles | 返回此事件类型在事件传播路径中是否冒泡。 |
currentTarget | 事件的当前目标。这是传播路径中正在为其执行事件处理程序的 VisualElement。 |
dispatch | 指示事件是否正在分派到可视元素。事件在分派时不能重新分派。如果您需要递归地分派事件,建议您使用事件的副本。 |
imguiEvent | 此事件源头的 IMGUIEvent。源可能为 null,因为并非所有事件都由 IMGUI 生成。 |
isImmediatePropagationStopped | 指示是否为此事件调用了 StopImmediatePropagation()。 |
isPropagationStopped | 是否为此事件调用了 StopPropagation()。 |
originalMousePosition | IMGUI 事件的原始鼠标位置,在转换为当前目标本地坐标之前。 |
pooled | 事件是否从事件池中分配。 |
propagationPhase | 此事件的当前传播阶段。 |
target | 接收此事件的目标可视元素。与 currentTarget 不同,此目标在事件沿传播路径发送到其他元素时不会改变。 |
timestamp | 创建事件的时间(以毫秒为单位)。 |
tricklesDown | 返回此事件在 TrickleDown 阶段是否沿事件传播路径向下发送。 |
eventTypeId | 检索此事件实例的类型 ID。 |
StopImmediatePropagation | 立即停止事件的传播。事件不会发送到传播路径中的其他元素。此方法阻止其他事件处理程序在当前目标上执行。 |
StopPropagation | 停止传播此事件。事件不会发送到传播路径中的其他元素。此方法不会阻止其他事件处理程序在当前目标上执行。如果此方法在 TrickleDown 传播阶段调用,它将阻止处理默认操作,例如元素因 PointerDownEvent 而获得焦点。 |
Dispose | IDispose 的实现。 |
Init | 将事件成员重置为其初始值。 |
PostDispatch | 允许子类在事件分派后执行自定义逻辑。 |
PreDispatch | 允许子类在事件分派之前执行自定义逻辑。 |
GetPooled | 从事件池中获取一个事件,并使用给定值对其进行初始化。使用此函数而不是创建新事件。使用此方法获得的事件需要释放回池中。您可以使用 Dispose() 来释放它们。 |
RegisterEventType | 将事件类注册到事件类型系统。 |
GetPooled | 从事件池中获取一个事件。使用此函数而不是创建新事件。使用此方法获得的事件需要释放回池中。您可以使用 Dispose() 来释放它们。 |
TypeId | 检索此事件实例的类型 ID。 |
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.