Hold objects in struct fields and list items #238

Closed
opened 2026-09-26 20:47:07 +02:00 by meleki · 1 comment
Owner

An object can so far only be held by an object variable. A struct field or a list item turned it into its name the moment it was written into a variable.

What changes

  • object is a struct field kind (+ Field -> Object) and a list item kind (+ Item -> Object), next to the object variable.
  • At rest (file, snapshot, inspector, List tab) an object's place always holds the empty object, stored as {"$object": ""} wherever it sits. The inspector and the List tab show (null) and offer nothing to pick.
  • During a run the object sits right in the value. Expand gives a field back as the object, Item at an item. A list written from Raycast all stays a list of objects.
  • A destroyed object reads as (null), alone as well as out of a list or struct.
  • One mechanism instead of two: the separate object slots of the object variable (core/graph/objectSlots.ts) are gone. Every way out of a run empties the objects again (core/graph/liveObjects.ts, withoutObjects):
    • the values the editor run writes back into the scene as overrides (World.syncToModel), and the re-read of the model keeps what the run holds (syncFromModel),
    • the save of a persistent Variables asset (savedSnapshot),
    • the live values the inspector shows,
    • the world snapshot of the test hooks (objects as their names there).
  • Keep (#229) carries objects in structs and lists across calls, and does not resume an object where the declaration now says something else.

Not in scope

  • A stored reference to a placed scene object (scene + object id).
An object can so far only be held by an object variable. A struct field or a list item turned it into its name the moment it was written into a variable. ## What changes - `object` is a struct field kind (`+ Field -> Object`) and a list item kind (`+ Item -> Object`), next to the object variable. - At rest (file, snapshot, inspector, List tab) an object's place always holds the empty object, stored as `{"$object": ""}` wherever it sits. The inspector and the List tab show `(null)` and offer nothing to pick. - During a run the object sits right in the value. `Expand` gives a field back as the object, `Item at` an item. A list written from `Raycast all` stays a list of objects. - A destroyed object reads as `(null)`, alone as well as out of a list or struct. - One mechanism instead of two: the separate object slots of the object variable (`core/graph/objectSlots.ts`) are gone. Every way out of a run empties the objects again (`core/graph/liveObjects.ts`, `withoutObjects`): - the values the editor run writes back into the scene as overrides (`World.syncToModel`), and the re-read of the model keeps what the run holds (`syncFromModel`), - the save of a persistent Variables asset (`savedSnapshot`), - the live values the inspector shows, - the world snapshot of the test hooks (objects as their names there). - Keep (#229) carries objects in structs and lists across calls, and does not resume an object where the declaration now says something else. ## Not in scope - A stored reference to a placed scene object (scene + object id).
Author
Owner

Umgesetzt in 7979b8f, Wiki 96bc416.

Verhalten

  • Objekte lassen sich jetzt in Struct-Feldern und Listen-Items halten, nicht nur in einer Object-Variable. "+ Field" und "+ Item" bieten Object an, im Editor steht dort immer (null).
  • Ein Spawn-Ausgang über Pack ins Struct kommt beim nächsten Frame per Expand als dasselbe Objekt zurück, in Listen über Item at.
  • Ein zerstörtes Objekt liest sich überall als (null).
  • Listen aus Raycast all bleiben Objekte, statt beim Schreiben zu Namen zu werden.
  • Keep (#229) nimmt Objekte in Structs und Listen mit.

Aufbau

  • Einheitliche Ruheform {"$object": ""}. Die Slots aus 98211a8 (objectSlots.ts) sind durch einen Mechanismus ersetzt.
  • liveObjects.ts leert Objekte an allen Ausgängen: Szenen-Overrides des Editor-Runs, Spielstände persistenter Variables-Assets, Live-Werte im Inspector, Welt-Snapshot der Test-Hooks.
  • Kein Projekt auf dem Server hatte Object-Variablen, alte Daten sind nicht betroffen.

Fund: CI an 98211a8 war rot, einziger FAIL e2e 21d (fehlendes asset in der Erwartung aus #237). Mit diesem Commit nachgezogen.

Tests

  • ./check.sh: 169 Files, 2475 Tests, CHECK EXIT 0.
  • e2e 6, 21, 23, 32: ALL PASSED, 213 Checks. Neuer Check 21d-ii legt per Klick ein Object-Item an.
  • 7 Gegenproben, alle greifen.
  • Nicht eigens getestet: Leerung der Inspector-Live-Werte, Namen im Test-Snapshot, "+ Field → Object" per Klick.
  • e2e-Summe 1407, nur gerechnet. CI-Lauf nicht abgewartet.
Umgesetzt in 7979b8f, Wiki 96bc416. **Verhalten** - Objekte lassen sich jetzt in Struct-Feldern und Listen-Items halten, nicht nur in einer Object-Variable. "+ Field" und "+ Item" bieten Object an, im Editor steht dort immer `(null)`. - Ein Spawn-Ausgang über `Pack` ins Struct kommt beim nächsten Frame per `Expand` als dasselbe Objekt zurück, in Listen über `Item at`. - Ein zerstörtes Objekt liest sich überall als `(null)`. - Listen aus `Raycast all` bleiben Objekte, statt beim Schreiben zu Namen zu werden. - Keep (#229) nimmt Objekte in Structs und Listen mit. **Aufbau** - Einheitliche Ruheform `{"$object": ""}`. Die Slots aus 98211a8 (`objectSlots.ts`) sind durch einen Mechanismus ersetzt. - `liveObjects.ts` leert Objekte an allen Ausgängen: Szenen-Overrides des Editor-Runs, Spielstände persistenter Variables-Assets, Live-Werte im Inspector, Welt-Snapshot der Test-Hooks. - Kein Projekt auf dem Server hatte Object-Variablen, alte Daten sind nicht betroffen. **Fund:** CI an 98211a8 war rot, einziger FAIL e2e 21d (fehlendes `asset` in der Erwartung aus #237). Mit diesem Commit nachgezogen. **Tests** - `./check.sh`: 169 Files, 2475 Tests, CHECK EXIT 0. - e2e 6, 21, 23, 32: ALL PASSED, 213 Checks. Neuer Check 21d-ii legt per Klick ein Object-Item an. - 7 Gegenproben, alle greifen. - Nicht eigens getestet: Leerung der Inspector-Live-Werte, Namen im Test-Snapshot, "+ Field → Object" per Klick. - e2e-Summe 1407, nur gerechnet. CI-Lauf nicht abgewartet.
admin added this to the Development project 2026-09-27 11:28:31 +02:00
admin moved this to Done in Development on 2026-09-27 11:29:11 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: meleki/feuerwerk#238