stateObservable
For receiving the SpatialContainerState of SpatialContainer and dispatching it to observers.
You can use this observable to add your observer, for example:
stateObservable.addObserver(object : SpatialContainerStateObserver {
override fun onEvent(source: SpatialContainerStateOwner, event: SpatialStateEvent) {
// do something
}
})Content copied to clipboard
Throws
IllegalStateException
This exception is thrown if the SpatialContainer is not registered.