---
title: "clientSettings"
description: "The client's settings: the person's own on this device for the account signed in, the same in every world, on every platform and in a headset."
section: "API Reference"
slug: "api-clientsettings"
canonical: "https://origozero.ai/docs/api-clientsettings"
updated: "2026-11-14T18:02:10.745003177+00:00"
tags: ["api", "reference"]
---

# clientSettings

The client's settings: the person's own on this device for the account signed in, the same in every world, on every platform and in a headset. Each one is declared once by the engine, in a group: a key, the field its value must satisfy, the scope it is kept in, and the effect a change has. `clientSettings.list()` states every group with each entry's value and where that value comes from; `set`, `reset` and `run` change them. They show as the System tab of the app menu (`appMenu`), each group one of its sections. A world reads them (`clientSettings.get("xr.perspective")`) and opens them (`clientSettings.open()`), and never changes them: a write with world or agent code behind it is refused, whether that code is on the stack or started or resumed the coroutine or task the write runs on (or one further back). They are a different thing from the world's own settings file (`settings`).

```lua
require("@builtin::modules.api.engine.client_settings") -- clientSettings (also available as global 'clientSettings')
```

The `clientSettings` namespace: 44 functions.

## globals/clientSettings/buildSection {#globals-clientsettings-buildsection}

```lua
clientSettings.buildSection(model: { [string]: any }) -> { [string]: any }
```

The System tab's widget tree, drawn from `list()`, in the room
`model.width` x `model.height` the app menu leaves it: the visible groups
as sections (down the side on a desktop and a headset's panel, across the
top on a phone) and the entries of the one chosen, each with its control,
and a way to put the group back to its defaults.

**Parameters**

- `model` `{ [string]: any }` — `{ width, height, presentation?, group?, groups? }`: `groups` is
the `list()` to draw, the current one when left out.

**Returns** `{ [string]: any }` — The widget tree.

## globals/clientSettings/close {#globals-clientsettings-close}

```lua
clientSettings.close()
```

Close the app menu.

## globals/clientSettings/get {#globals-clientsettings-get}

```lua
clientSettings.get(key: string) -> any
```

The value of the setting under `key`: the one the person chose, or
the setting's default while they chose none.

**Parameters**

- `key` `string` — The setting's dotted key, e.g. `"xr.perspective"`.

**Returns** `any` — The value; nil for a key no setting is declared under.

```lua
local perspective = clientSettings.get("xr.perspective")
```

## globals/clientSettings/isOpen {#globals-clientsettings-isopen}

```lua
clientSettings.isOpen() -> boolean
```

Whether the app menu shows the System tab.

**Returns** `boolean`

## globals/clientSettings/list {#globals-clientsettings-list}

```lua
clientSettings.list() -> { GroupRow }
```

Every group declared, in its order, each with its entries: a
setting's value, default, where the value comes from (`"player"` once the
person chose one, `"default"` before), its scope, its choices or range,
and whether it can be used now; an action's button. A group's `visible`
says whether its tab shows on this client now. The settings menu draws
exactly this.

**Returns** `{ GroupRow }`.

```lua
for _, g in clientSettings.list() do print(g.title, #g.entries) end
```

## globals/clientSettings/onChanged {#globals-clientsettings-onchanged}

```lua
clientSettings.onChanged(fn: (key: string?, value: any) -> ()) -> () -> ()
```

Call `fn(key, value)` whenever a setting changes, and `fn(nil)` when
the account they belong to changes.

**Parameters**

- `fn` `(key: string?, value: any) -> ()` — The listener.

**Returns** `() -> ()` — A function that stops the listener.

## globals/clientSettings/open {#globals-clientsettings-open}

```lua
clientSettings.open(group: string?)
```

Open the app menu on its System tab: over the window on desktop, as
a world panel in front of the person in a headset. Every way in opens the
same menu, a world's own pause tab included.

**Parameters**

- `group` `string` _(optional)_ — The section to open on (`"vr"`), or the one shown last.

## globals/clientSettings/reachable {#globals-clientsettings-reachable}

```lua
clientSettings.reachable() -> boolean
```

Whether some group of the settings shows on this client now. The
System tab of the app menu and the editor's ways into it (its menu, the
dock in a headset) show while one does.

**Returns** `boolean` — Whether some group is visible.

## globals/clientSettings/register {#globals-clientsettings-register}

```lua
clientSettings.register(list: { Entry })
```

Declare settings and actions, each naming the group it shows in.
Each setting's value is applied at once. An entry declared again under its
key replaces the earlier one.

**Parameters**

- `list` `{ Entry }` — The entries: `{ key, group, label, description?, field?, labels?, step?, format?, scope?, kept?, effect, button?, danger?, available? }`. A setting names its `scope`, or carries `kept = { get, set }` when the system it configures keeps the person's choice.

## globals/clientSettings/registerGroup {#globals-clientsettings-registergroup}

```lua
clientSettings.registerGroup(group: Group)
```

Declare a group of settings: one tab of the menu. A group declared
again under its id replaces the earlier declaration and keeps its entries.

**Parameters**

- `group` `Group` — `{ id, title, description?, icon?, order?, visible? }`.

## globals/clientSettings/reset {#globals-clientsettings-reset}

```lua
clientSettings.reset(target: string)
```

Return a setting, or every setting of a group, to its default: the
person's choice is forgotten and the effect carried out with the default.
Refused, like `set`, with world or agent code behind it.

**Parameters**

- `target` `string` — A setting's key, or a group's id.

```lua
clientSettings.reset("vr")
```

## globals/clientSettings/run {#globals-clientsettings-run}

```lua
clientSettings.run(key: string)
```

Run the action declared under `key` (recenter, enter VR, exit VR), as
its button in the menu does. Refused with world or agent code behind it.

**Parameters**

- `key` `string` — The action's key.

## globals/clientSettings/set {#globals-clientsettings-set}

```lua
clientSettings.set(key: string, value: any?)
```

Change the setting under `key` to `value` as the person's choice: the
value is held to the setting's field, kept in its scope, and its effect
carried out. The person's settings are changed by the engine: a call with
world or agent code behind it (on the stack, or behind the coroutine or
task it runs on) raises, naming the setting.

**Parameters**

- `key` `string` — The setting's dotted key.
- `value` `any` _(optional)_ — A value the setting's field takes.

```lua
clientSettings.set("xr.turn", "smooth")
```

## globals/clientSettings/writable {#globals-clientsettings-writable}

```lua
clientSettings.writable() -> boolean
```

Whether a change made from here would be taken: true for the
engine's own code, false with world or agent code behind the call: on
the stack, or behind the coroutine or task it runs on.

**Returns** `boolean` — Whether `set`, `reset` and `run` would be taken.

## modules/clientSettings/buildSection {#modules-clientsettings-buildsection}

```lua
buildSection(model: { [string]: any }): { [string]: any }
```

The System tab's widget tree, drawn from `list()`, in the room
`model.width` x `model.height` the app menu leaves it: the visible groups
as sections (down the side on a desktop and a headset's panel, across the
top on a phone) and the entries of the one chosen, each with its control,
and a way to put the group back to its defaults.

**Parameters**

- `model` `{ [string]: any }` — `{ width, height, presentation?, group?, groups? }`: `groups` is
the `list()` to draw, the current one when left out.

## modules/clientSettings/close {#modules-clientsettings-close}

```lua
close()
```

Close the app menu.

## modules/clientSettings/get {#modules-clientsettings-get}

```lua
get(key: string): any
```

The value of the setting under `key`: the one the person chose, or
the setting's default while they chose none.

**Parameters**

- `key` `string` — The setting's dotted key, e.g. `"xr.perspective"`.

```lua
local perspective = clientSettings.get("xr.perspective")
```

## modules/clientSettings/install {#modules-clientsettings-install}

```lua
install()
```

Follow the account the settings belong to and keep the System tab
current while it is shown. Called once by the prelude.

## modules/clientSettings/isOpen {#modules-clientsettings-isopen}

```lua
isOpen(): boolean
```

Whether the app menu shows the System tab.

## modules/clientSettings/list {#modules-clientsettings-list}

```lua
list(): { GroupRow }
```

Every group declared, in its order, each with its entries: a
setting's value, default, where the value comes from (`"player"` once the
person chose one, `"default"` before), its scope, its choices or range,
and whether it can be used now; an action's button. A group's `visible`
says whether its tab shows on this client now. The settings menu draws
exactly this.

```lua
for _, g in clientSettings.list() do print(g.title, #g.entries) end
```

## modules/clientSettings/onChanged {#modules-clientsettings-onchanged}

```lua
onChanged(fn: (key: string?, value: any) -> ()): () -> ()
```

Call `fn(key, value)` whenever a setting changes, and `fn(nil)` when
the account they belong to changes.

**Parameters**

- `fn` `(key: string?, value: any) -> ()` — The listener.

**Returns** `()` — A function that stops the listener.

## modules/clientSettings/open {#modules-clientsettings-open}

```lua
open(group: string?)
```

Open the app menu on its System tab: over the window on desktop, as
a world panel in front of the person in a headset. Every way in opens the
same menu, a world's own pause tab included.

**Parameters**

- `group` `string?` _(optional)_ — The section to open on (`"vr"`), or the one shown last.

## modules/clientSettings/reachable {#modules-clientsettings-reachable}

```lua
reachable(): boolean
```

Whether some group of the settings shows on this client now. The
System tab of the app menu and the editor's ways into it (its menu, the
dock in a headset) show while one does.

## modules/clientSettings/register {#modules-clientsettings-register}

```lua
register(list: { Entry })
```

Declare settings and actions, each naming the group it shows in.
Each setting's value is applied at once. An entry declared again under its
key replaces the earlier one.

**Parameters**

- `list` `{ Entry }` — The entries: `{ key, group, label, description?, field?, labels?, step?, format?, scope?, kept?, effect, button?, danger?, available? }`. A setting names its `scope`, or carries `kept = { get, set }` when the system it configures keeps the person's choice.

## modules/clientSettings/registerGroup {#modules-clientsettings-registergroup}

```lua
registerGroup(group: Group)
```

Declare a group of settings: one tab of the menu. A group declared
again under its id replaces the earlier declaration and keeps its entries.

**Parameters**

- `group` `Group` — `{ id, title, description?, icon?, order?, visible? }`.

## modules/clientSettings/reset {#modules-clientsettings-reset}

```lua
reset(target: string)
```

Return a setting, or every setting of a group, to its default: the
person's choice is forgotten and the effect carried out with the default.
Refused, like `set`, with world or agent code behind it.

**Parameters**

- `target` `string` — A setting's key, or a group's id.

```lua
clientSettings.reset("vr")
```

## modules/clientSettings/run {#modules-clientsettings-run}

```lua
run(key: string)
```

Run the action declared under `key` (recenter, enter VR, exit VR), as
its button in the menu does. Refused with world or agent code behind it.

**Parameters**

- `key` `string` — The action's key.

## modules/clientSettings/set {#modules-clientsettings-set}

```lua
set(key: string, value: any)
```

Change the setting under `key` to `value` as the person's choice: the
value is held to the setting's field, kept in its scope, and its effect
carried out. The person's settings are changed by the engine: a call with
world or agent code behind it (on the stack, or behind the coroutine or
task it runs on) raises, naming the setting.

**Parameters**

- `key` `string` — The setting's dotted key.
- `value` `any` _(optional)_ — A value the setting's field takes.

```lua
clientSettings.set("xr.turn", "smooth")
```

## modules/clientSettings/tab {#modules-clientsettings-tab}

```lua
tab(): { [string]: any }
```

The System tab of the app menu, as the built-in
`menuTabs/system.menuTab` hands it to the menu.

## modules/clientSettings/writable {#modules-clientsettings-writable}

```lua
writable(): boolean
```

Whether a change made from here would be taken: true for the
engine's own code, false with world or agent code behind the call: on
the stack, or behind the coroutine or task it runs on.

## typed/builtin//modules/api/engine/client_settings/clientSettings/buildSection {#typed-builtin-modules-api-engine-client-settings-clientsettings-buildsection}

```lua
clientSettings.buildSection(model: { [string]: any }) -> { [string]: any }
```

The System tab's widget tree, drawn from `list()`, in the room
`model.width` x `model.height` the app menu leaves it: the visible groups
as sections (down the side on a desktop and a headset's panel, across the
top on a phone) and the entries of the one chosen, each with its control,
and a way to put the group back to its defaults.

**Parameters**

- `model` `{ [string]: any }` — `{ width, height, presentation?, group?, groups? }`: `groups` is
the `list()` to draw, the current one when left out.

**Returns** `{ [string]: any }` — The widget tree.

## typed/builtin//modules/api/engine/client_settings/clientSettings/close {#typed-builtin-modules-api-engine-client-settings-clientsettings-close}

```lua
clientSettings.close()
```

Close the app menu.

## typed/builtin//modules/api/engine/client_settings/clientSettings/get {#typed-builtin-modules-api-engine-client-settings-clientsettings-get}

```lua
clientSettings.get(key: string) -> any
```

The value of the setting under `key`: the one the person chose, or
the setting's default while they chose none.

**Parameters**

- `key` `string` — The setting's dotted key, e.g. `"xr.perspective"`.

**Returns** `any` — The value; nil for a key no setting is declared under.

```lua
local perspective = clientSettings.get("xr.perspective")
```

## typed/builtin//modules/api/engine/client_settings/clientSettings/isOpen {#typed-builtin-modules-api-engine-client-settings-clientsettings-isopen}

```lua
clientSettings.isOpen() -> boolean
```

Whether the app menu shows the System tab.

**Returns** `boolean`

## typed/builtin//modules/api/engine/client_settings/clientSettings/list {#typed-builtin-modules-api-engine-client-settings-clientsettings-list}

```lua
clientSettings.list() -> { GroupRow }
```

Every group declared, in its order, each with its entries: a
setting's value, default, where the value comes from (`"player"` once the
person chose one, `"default"` before), its scope, its choices or range,
and whether it can be used now; an action's button. A group's `visible`
says whether its tab shows on this client now. The settings menu draws
exactly this.

**Returns** `{ GroupRow }`.

```lua
for _, g in clientSettings.list() do print(g.title, #g.entries) end
```

## typed/builtin//modules/api/engine/client_settings/clientSettings/onChanged {#typed-builtin-modules-api-engine-client-settings-clientsettings-onchanged}

```lua
clientSettings.onChanged(fn: (key: string?, value: any) -> ()) -> () -> ()
```

Call `fn(key, value)` whenever a setting changes, and `fn(nil)` when
the account they belong to changes.

**Parameters**

- `fn` `(key: string?, value: any) -> ()` — The listener.

**Returns** `() -> ()` — A function that stops the listener.

## typed/builtin//modules/api/engine/client_settings/clientSettings/open {#typed-builtin-modules-api-engine-client-settings-clientsettings-open}

```lua
clientSettings.open(group: string?)
```

Open the app menu on its System tab: over the window on desktop, as
a world panel in front of the person in a headset. Every way in opens the
same menu, a world's own pause tab included.

**Parameters**

- `group` `string` _(optional)_ — The section to open on (`"vr"`), or the one shown last.

## typed/builtin//modules/api/engine/client_settings/clientSettings/reachable {#typed-builtin-modules-api-engine-client-settings-clientsettings-reachable}

```lua
clientSettings.reachable() -> boolean
```

Whether some group of the settings shows on this client now. The
System tab of the app menu and the editor's ways into it (its menu, the
dock in a headset) show while one does.

**Returns** `boolean` — Whether some group is visible.

## typed/builtin//modules/api/engine/client_settings/clientSettings/register {#typed-builtin-modules-api-engine-client-settings-clientsettings-register}

```lua
clientSettings.register(list: { Entry })
```

Declare settings and actions, each naming the group it shows in.
Each setting's value is applied at once. An entry declared again under its
key replaces the earlier one.

**Parameters**

- `list` `{ Entry }` — The entries: `{ key, group, label, description?, field?, labels?, step?, format?, scope?, kept?, effect, button?, danger?, available? }`. A setting names its `scope`, or carries `kept = { get, set }` when the system it configures keeps the person's choice.

## typed/builtin//modules/api/engine/client_settings/clientSettings/registerGroup {#typed-builtin-modules-api-engine-client-settings-clientsettings-registergroup}

```lua
clientSettings.registerGroup(group: Group)
```

Declare a group of settings: one tab of the menu. A group declared
again under its id replaces the earlier declaration and keeps its entries.

**Parameters**

- `group` `Group` — `{ id, title, description?, icon?, order?, visible? }`.

## typed/builtin//modules/api/engine/client_settings/clientSettings/reset {#typed-builtin-modules-api-engine-client-settings-clientsettings-reset}

```lua
clientSettings.reset(target: string)
```

Return a setting, or every setting of a group, to its default: the
person's choice is forgotten and the effect carried out with the default.
Refused, like `set`, with world or agent code behind it.

**Parameters**

- `target` `string` — A setting's key, or a group's id.

```lua
clientSettings.reset("vr")
```

## typed/builtin//modules/api/engine/client_settings/clientSettings/run {#typed-builtin-modules-api-engine-client-settings-clientsettings-run}

```lua
clientSettings.run(key: string)
```

Run the action declared under `key` (recenter, enter VR, exit VR), as
its button in the menu does. Refused with world or agent code behind it.

**Parameters**

- `key` `string` — The action's key.

## typed/builtin//modules/api/engine/client_settings/clientSettings/set {#typed-builtin-modules-api-engine-client-settings-clientsettings-set}

```lua
clientSettings.set(key: string, value: any?)
```

Change the setting under `key` to `value` as the person's choice: the
value is held to the setting's field, kept in its scope, and its effect
carried out. The person's settings are changed by the engine: a call with
world or agent code behind it (on the stack, or behind the coroutine or
task it runs on) raises, naming the setting.

**Parameters**

- `key` `string` — The setting's dotted key.
- `value` `any` _(optional)_ — A value the setting's field takes.

```lua
clientSettings.set("xr.turn", "smooth")
```

## typed/builtin//modules/api/engine/client_settings/clientSettings/writable {#typed-builtin-modules-api-engine-client-settings-clientsettings-writable}

```lua
clientSettings.writable() -> boolean
```

Whether a change made from here would be taken: true for the
engine's own code, false with world or agent code behind the call: on
the stack, or behind the coroutine or task it runs on.

**Returns** `boolean` — Whether `set`, `reset` and `run` would be taken.
