Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Contains(VisualElement)

Checks if this element is an ancestor of the specified child element.
Read time 1 minuteLast updated 7 days ago

Definition

public bool Contains(VisualElement child)

Parameters

The child element to test against.

Returns

Type

Description

boolReturns 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.