SplitScript reference / UnityContext

UnityContext

record

record UnityContext

Attachment-scoped Unity engine facilities.

The Unity state provider exposes one read-only value named unity. Context members are bound once per process attachment before onAttach runs and remain available in attached lifecycle blocks and state reads.

Examples

Read the active scene through the Unity context

whileAttached {
    let active = unity.scenes.active() else return
    print(active.name)
}

Fields

MemberDescriptionAvailable through
scenesAccesses native Unity scene snapshots and hierarchy roots.