update dcs

This commit is contained in:
luzieahrens
2026-07-04 09:03:58 +02:00
parent c73a82943f
commit 14de604ad2
4 changed files with 182 additions and 3 deletions
+42 -1
View File
@@ -12,7 +12,9 @@ This document describes the JSON format saved to and loaded from the database.
"skybox": "string | null",
"sky-color": "#rrggbb",
"jsonversion": 2.0,
"items": [ ...RoomItem ]
"items": [ ...RoomItem ],
"groups": { ...SceneGroups },
"background_sound": "string | null"
}
```
@@ -23,6 +25,8 @@ This document describes the JSON format saved to and loaded from the database.
| `sky-color` | `string` | Background hex color |
| `jsonversion` | `number` | Schema version (`2.0`) |
| `items` | `RoomItem[]` | All objects in the room |
| `groups` | `SceneGroups` (optional) | Item/group hierarchy created via the Grouping feature. Omitted entirely when there are no groups |
| `background_sound` | `string \| null` (optional) | Storage path of the uploaded ambient sound file, set from World Settings → Sound |
---
@@ -57,6 +61,32 @@ All values are serialized as strings.
---
## `SceneGroups`
Top-level `groups` field grouping items (and other groups) so they can be selected/moved together in the Creator. Keyed by numeric group ID, parallel to `items` being keyed by item ID.
```json
{
"1": {
"name": "Group 1",
"children": [
{ "kind": "item", "id": 4 },
{ "kind": "item", "id": 7 },
{ "kind": "group", "id": 2 }
]
}
}
```
| Field | Type | Description |
|---|---|---|
| `name` | `string` | Display name, editable in the Item List |
| `children` | `GroupChild[]` | Members of the group — either an item (`{ "kind": "item", "id": <RoomItem.id> }`) or a nested group (`{ "kind": "group", "id": <group id> }`) |
Group membership references stable `RoomItem.id`s (see the `id` note above), so groups keep pointing at the right items across save/load. The `groups` field is omitted from the export entirely when the room has no groups.
---
## Per-type `resourcename` and custom args
### Basic shapes
@@ -96,6 +126,14 @@ All values are serialized as strings.
| `Presentation` | `PresentationWall` | `file`, `widthcrop`, `heightcrop`, `controls` _(❌ not in Creator)_ |
| `Camera` | `CCTVCamera` | `target` (`"x,y,z"`), `fov` (derived: `zoom * 60`) |
### Logic
| Creator type | `resourcename` | Custom args |
|---|---|---|
| `Area` | `Area` | `color`, `opacity` _(serialized but not user-editable; the area is always rendered as an orange glow in the editor)_ |
> The Area Collider is an editor-only helper zone with no Unity-side visual — its footprint is defined by `scale.x`/`scale.z`. It is picked as the `sourceItemId` of an `"in_area"` Block Coding trigger (see [Block Coding data structure](./data-structure-block-coding.md)).
### Other / Props
| Creator type | `resourcename` | `type` field | Custom args |
@@ -118,6 +156,9 @@ All values are serialized as strings.
| Arg | Type | Description |
|---|---|---|
| `grabable` | `"true" \| "false"` | Whether the item can be grabbed in-experience |
| `locked` | `"true" \| "false"` | Whether the item is locked against moving/deleting in the Creator. Editor-only concern — Unity/runtime does not read this arg |
> `grabable` and `locked` are both written by the shared `buildCustomArgs()` helper, so they are present on every type **except** `Text`, `Billboard`, and `Entrance`, which build their `item-custom-args` array by hand and currently omit both.
---