AnchorEntityTester


class AnchorEntityTester


A test-only accessor for AnchorEntity that enables direct manipulation and inspection of its internal state.

Summary

Public functions

open operator Boolean
equals(other: Any?)
open Int
Unit

Simulates a change to the underlying space's origin.

Public properties

AnchorEntity.State?

The state of the AnchorEntity.

Public functions

equals

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

hashCode

open fun hashCode(): Int

triggerOnOriginChanged

Added in 1.0.0-alpha16
fun triggerOnOriginChanged(): Unit

Simulates a change to the underlying space's origin.

This function manually triggers any listeners registered via AnchorEntity.addOriginChangedListener, allowing tests to verify that the application correctly responds to spatial updates from the system.

Public properties

state

Added in 1.0.0-alpha16
var stateAnchorEntity.State?

The state of the AnchorEntity.

Setting this property simulates a system-level state change (e.g., from AnchorEntity.State.UNANCHORED to AnchorEntity.State.ANCHORED) and triggers the listener set by AnchorEntity.addStateChangedListener.