SplitScript reference / Unity

Unity

namespace

Provides Unity runtime utilities outside managed schema declarations.

Use the Unity state provider with top-level image and class declarations for managed Mono or IL2CPP state. This namespace contains supplementary Unity facilities such as native scene discovery; raw managed metadata traversal is an implementation detail of the provider.

Examples

Read the active native Unity scene

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