SplitScript reference / UnityScenes / persistent

UnityScenes.persistent

Method

UnityScenes.persistent() -> UnityScene!

Reads Unity's persistent DontDestroyOnLoad scene.

Unity keeps objects that survive ordinary scene transitions in this special scene. The result is an immutable snapshot with the same identity and metadata fields as active.

Effects: allocates, reads process memory, requires an attached process

Runtime behavior: available while a process is attached, except in onDetach; synchronous

Examples

Inspect the persistent scene

state Unity ["game.exe"] {
    persistentScene = unity.scenes.persistent();
}