---
title: "hasAnyDescendant"
description: "Verifies whether any descendant of the 3D semantic node satisfies the given condition."
type: "function"
lastmod: "2026-06-18T10:32:52.440251Z"
---
## API Reference

### hasAnyDescendant

> Source set: Android

```kotlin
public fun hasAnyDescendant(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies whether any descendant of the 3D semantic node satisfies the given condition.

Recursively descends the 3D semantic structure to locate deeply nested elements.

```
|-X
|-A |-B   |-C1   |-C2
```

In case of A, we would check the matcher against B, C1 and C2.

#### Parameters

| | |
| --- | --- |
| matcher | The semantic criteria for the expected descendant. |

#### Returns

| | |
| --- | --- |
|  | a matcher validating the presence of the specified descendant. |
