Contains(VisualElement)
Checks if this element is an ancestor of the specified child element.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public bool Contains(VisualElement child)
Parameters
The child element to test against.
Returns
Type | Description |
|---|---|
| bool | Returns true if this element is a ancestor of the child element, false otherwise. |
Remarks
This method "walks up" the hierarchy of the child element until it reaches this element or the root of the visual tree.