Unity Package Manager (UPM) package that consumes OpenApparatus.Core to procedurally generate reproducible navigation environments — multi-room floor plans, mazes, and behavioral-research apparatuses — directly inside Unity scenes.
-
Clone
openapparatus-coreand this repo as siblings:git clone https://github.com/OpenApparatus/core.git openapparatus-core git clone https://github.com/OpenApparatus/unity.git openapparatus-unity
-
Build and stage the Core DLL into
Plugins/:# macOS / Linux bash openapparatus-unity/build/publish-core-dll.sh # Windows (PowerShell) .\openapparatus-unity\build\publish-core-dll.ps1
-
Add the package to a Unity project's
Packages/manifest.json:{ "dependencies": { "com.openapparatus.unity": "file:../path/to/openapparatus-unity" } }…or copy
openapparatus-unityinto your project'sPackages/folder directly. -
Drop a FloorPlanInstance component onto an empty GameObject. Tweak any field in the inspector — the floor plan rebuilds live.
| Path | What it is |
|---|---|
Plugins/OpenApparatus.Core.dll |
The engine-agnostic Core library (built by the publish script) |
Runtime/FloorPlanInstance.cs |
MonoBehaviour driving generation; owns the spawned children |
Runtime/UnityMeshAdapter.cs |
Converts engine-agnostic MeshData → UnityEngine.Mesh |
Editor/FloorPlanInstanceEditor.cs |
Custom inspector with Generate / Reseed / Clear buttons |
FloorPlanInstance is a thin Unity adapter:
- Reads its own parameters (floor dimensions, rectangle count, wall thickness/height, door dimensions, seed, materials).
- Calls
OpenApparatus.Coreto generate aFloorPlanand assemble per-cell meshes. - Spawns one child GameObject per cell with a
MeshFilter+MeshRenderer. - Each cell mesh has three submeshes —
0=Floor,1=Walls,2=Ceiling— and the inspector's three Material slots map to them in that order.
In the editor, every parameter change debounces into one rebuild via OnValidate + EditorApplication.delayCall. Toggle autoRegenerateInEditor off to disable that and use the Generate button instead.
Targets Unity 6000.4 and newer. The bundled Core DLL is built against netstandard2.1.
- OpenApparatus/core — the engine-agnostic .NET library
- OpenApparatus/studio — cross-platform desktop authoring app
MIT — see LICENSE.