Implement Wave 1 + Wave 2 import pipeline#3
Merged
Conversation
Lands the foundation and parallel-track tasks from docs/roadmap.md so
researchers can drag a Studio JSON export into Assets/ and spawn a
fully-componented environment with collider and prefab-substitution
support.
Wave 1 - Foundation:
- F1: build/publish-core-dll.{ps1,sh} scripts + Plugins/README explaining
how to drop in the netstandard2.1 OpenApparatus.Core.dll from a sibling
openapparatus-core clone.
- F2: Runtime components (EnvironmentRoot, Room, Wall, RoomObjectInstance,
OpeningSpec), MultiRoomEnvironmentAsset ScriptableObject + supporting
data types, OpenApparatusSpace coord-handedness helper, MaterialResolver,
OpenApparatusGeometry mesh wrapper.
- F3: MaterialResolver synthesises pipeline-appropriate defaults via
Shader.Find when no authored .mat is present; versionDefines wire URP /
HDRP detection through both asmdefs; Materials/README documents the
authored-default override path.
Wave 2 - Parallel:
- A: JsonEnvironmentImporter (ScriptedImporter for .json) with v3 sniff
+ v4 schema marker discriminator, POCO mirror of the JSON schema,
Newtonsoft.Json deserialisation (added as a UPM dependency), and a
JsonGeometryBuilder that produces per-room floor/wall/ceiling meshes
as sub-assets. Foreign .json files fall through to TextAsset.
- B: GltfEnvironmentPostprocessor recognises Room_<id>, Room_<id>_wall_<n>,
and Room_<id>_object_<slot>_<idx> node names and attaches the matching
components. Best-effort start/end from mesh bounds; passage defaults to
Closed unless a paired JSON wins.
- I: ColliderBuilder generates BoxCollider on each Wall (rotated to align
with the segment) and one BoxCollider per Room tile, gated by
MultiRoomEnvironmentAsset.ColliderMode.
- J: PrefabSubstitutionTable ScriptableObject + ReorderableList editor +
PrefabSubstitutionApplicator that swaps RoomObjectInstance placeholders
for researcher-supplied prefabs with position / rotation / scale
overrides.
- D: Samples~/ImportedEnvironment/ with single_room.json + README, wired
into package.json's samples block.
- E: Tests/Editor/ asmdef + tests for OpenApparatusSpace, JSON discriminator
/ importer, glTF postprocessor, collider builder, prefab substitution;
GitHub Actions workflow runs edit-mode tests via game-ci/unity-test-runner
against Tests/UnityProject (a minimal host that consumes the package via
a relative file:// dependency).
EnvironmentSpawner ties the spawn flow together: places rooms + walls +
placeholder objects, then runs PrefabSubstitutionApplicator and
ColliderBuilder in that order. Asset inspector exposes ColliderMode and
Substitution above the Spawn button.
Known gaps documented for follow-up:
- Plugins/OpenApparatus.Core.dll is not committed; run the publish script
against the sibling openapparatus-core clone to produce it.
- single_room.glb fixture for the glTF postprocessor needs Studio export;
current glTF test exercises the name-recognition logic via a synthetic
GameObject hierarchy.
- JsonGeometryBuilder produces simple wall prisms without door cutouts;
geometry quality is "topology-verifiable" not "presentation-ready".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lands the foundation and parallel-track tasks from docs/roadmap.md so researchers can drag a Studio JSON export into Assets/ and spawn a fully-componented environment with collider and prefab-substitution support.
Wave 1 - Foundation:
Wave 2 - Parallel:
EnvironmentSpawner ties the spawn flow together: places rooms + walls + placeholder objects, then runs PrefabSubstitutionApplicator and ColliderBuilder in that order. Asset inspector exposes ColliderMode and Substitution above the Spawn button.
Known gaps documented for follow-up: