SplitScript reference / UnityScenes

UnityScenes

record

record UnityScenes

Reads immutable snapshots from Unity's native scene manager.

The unity context discovers this facility once before onAttach and can then populate ordinary state fields. Scene reads return errors rather than partial values, so a transient process-memory failure participates in the state's normal transactional update behavior.

Examples

Track active and loaded Unity scenes

whileAttached {
    print(current.scene.name)
}

Methods

MemberDescriptionAvailable through
activeReads the currently active scene as an immutable snapshot.
loadedReads every currently loaded scene as one immutable array.
persistentReads Unity's persistent DontDestroyOnLoad scene.