SplitScript reference / SettingsView / enabled
SettingsView.enabled
Method
SettingsView.enabled(key: String) -> bool
Returns a declared boolean setting selected by its stable host-map key.
String literals are checked against the declared boolean keys and are completed by editor tooling. When a declaration has a statically visible source name, a literal lookup is warned and can be rewritten directly to settings.name or oldSettings.name. Computed unknown keys, and computed keys belonging to non-boolean settings, return false. The lookup reads the already-refreshed settings snapshot and does not query the host or allocate.
Parameters
key: The exact string key declared withkey "...", or the setting's source identifier when it has no explicit key.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Select a data-driven split
let missionKey = "42"
let shouldSplit = settings.enabled(missionKey)