---
title: "preset"
description: "The preset namespace — the engine's Luau API reference for preset."
section: "API Reference"
slug: "api-preset"
canonical: "https://origozero.ai/docs/api-preset"
updated: "2026-08-22T18:22:38.275674277+00:00"
tags: ["api", "reference"]
---

# preset

The `preset` namespace — 2 functions.

## globals/preset/create {#globals-preset-create}

```lua
preset.create(name: string, entityId: string, componentType: string, opts: PresetCreateOpts?) -> PresetCreateResult
```

Snapshot an existing component's public property table into a
preset asset on disk. Bare names land under
`/source/presets/<name>.preset/preset.yaml`; absolute paths must
point to a `.preset` directory or its inner `preset.yaml`.

**Parameters**

- `name` `string` — Either a bare preset name (lands under `/source/presets/`) or an absolute path to a `.preset` asset.
- `entityId` `string` — Source entity id.
- `componentType` `string` — Component to snapshot (e.g. `"CharacterController"`).
- `opts` `PresetCreateOpts` _(optional)_ — Optional creation options (currently just `{ name = displayName }`).

**Returns** `PresetCreateResult` — Metadata about the written preset: `{ path, entityId, component, properties }`.

```lua
preset.create("my_locomotion", entityId, "CharacterController")
```

## globals/preset/load {#globals-preset-load}

```lua
preset.load(source: AssetRef<preset>, overrides: table?) -> { [string]: any }
```

Load a preset asset and return the plain component property table.

**Parameters**

- `source` `AssetRef<preset>` — Ref-like input that must resolve to a preset asset before the function body runs.
- `overrides` `table` _(optional)_ — Optional table merged onto the loaded properties.

**Returns** `{ [string]: any }` — Plain table suitable for entity(id).component.add(type, data).

```lua
preset.load("@builtin::systems.characterController.presets.synty")
preset.load("/source/presets/my_locomotion.preset", { walkSpeed = 3.0 })
```
