# CoreState

Artifact: [androidx.xr.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/xr-runtime) [View Source](https://cs.android.com/search?q=file:androidx/xr/runtime/CoreState.kt+class:androidx.xr.runtime.CoreState) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

*** ** * ** ***


```
class CoreState
```

<br />

*** ** * ** ***

State of the XR system at a specific point in time.

Instances of this class can be accessed via the `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html` property. This class may include extension properties provided by implementations of the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/StateExtender` interface found during `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session` creation.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#CoreState(kotlin.time.ComparableTimeMark)(timeMark: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.time/-comparable-time-mark/index.html)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.time/-comparable-time-mark/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#timeMark()` at which the state was computed |

| ### Extension properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/arcore/PerceptionState?` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState.https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#(androidx.xr.runtime.CoreState).perceptionState()` State of the perception system at a specific point in time, corresponding to a `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState`. |

## Public constructors

### CoreState

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
CoreState(timeMark: ComparableTimeMark)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### timeMark

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
val timeMark: ComparableTimeMark
```

at which the state was computed

## Extension properties

### CoreState.perceptionState

Artifact: [androidx.xr.arcore:arcore](https://developer.android.com/jetpack/androidx/releases/xr-arcore) [View Source](https://cs.android.com/search?q=file:androidx/xr/arcore/PerceptionStateExtender.kt+symbol:perceptionState) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
val CoreState.perceptionState: PerceptionState?
```

State of the perception system at a specific point in time, corresponding to a `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState`.

This extension property provides a consistent snapshot of all available perception data (e.g., hands, eyes, trackables, depth, etc.) for the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/CoreState#timeMark()` of the receiver. All perception state objects within a single `https://developer.android.com/reference/kotlin/androidx/xr/arcore/PerceptionState` instance are synchronized to that particular moment in time.