# Spaces360 scene authoring (schema 2) This replaces the Spaces360 quick start in SETUP.md and the hotspot sections in README.md. Dialogue is unchanged. ## Concepts - A space is a GameObject with a `SpaceAnchor` under a `SpacesJourney` root, paired by ID with a node in the graph asset. - Transform position = where the 360 media was captured. Transform Y rotation = panorama alignment (stored as `panoramaRotationY`). - Graph canvas x/y only lay out the graph window. They never move the physical location. - Connections are explicit and directed. Nearby spaces are never connected automatically, so walls are respected. Use "Connect both ways" for the usual two-way link. - Arrival heading: the player faces the direction of travel (destination minus source, flattened to the ground plane). A to B to C faces one way; C to B to A faces the other. First entry uses the starting yaw of the entry space. If two spaces share a location, the current yaw is kept. Pitch resets to level. - Markers in Play mode are placed in the direction of the destination from the current space. No per-link yaw or pitch is needed. ## Setup 1. GameObject menu > Dialogue and Spaces > Create Spatial Journey. Choose where to save its graph asset. 2. On the SpatialJourney, assign a Spaces 360 Media Catalog (Assets > Create > Dialogue and Spaces). 3. Optional: Create Reference Map Quad, assign a floor-plan texture on an Unlit material, size it to real dimensions. It is hidden in Play mode. 4. Create spaces: GameObject menu > Dialogue and Spaces > Create Space Anchor, the Create Space Here button, or Add Space in the graph window. Duplicating an anchor creates a new ID with no connections. 5. Move anchors on the map (top-down Scene view). Set Media key and Media kind in the anchor inspector. 6. Select an anchor, choose a destination anchor, press Connect. Yellow lines with arrows show directed links in the Scene view. 7. Add `Spaces360Host` to an object, assign Journey and Player Camera (graph and catalog come from the journey). Add `SpacesLookController` to the camera. Press Play. 8. Run Navigation Self Tests (journey inspector) to check the arrival and connection rules. ## Files changed from the previous version Replace: Spaces360/Runtime/SpacesGraphData.cs, SpaceNavigator.cs, Spaces360Host.cs, SpacesLookController.cs, SpacesMediaCatalog.cs, SpacesGraphAsset.cs; Spaces360/Editor/SpacesGraphEditorWindow.cs; Samples/Spaces360/DemoSpaces.json. Add: Spaces360/Runtime/SpaceAnchor.cs, SpacesJourney.cs; Spaces360/Editor/SpacesSceneSync.cs, SpacesJourneyEditor.cs, SpaceAnchorEditor.cs, SpacesNavigationSelfTests.cs. Unchanged: both .asmdef files, PanoramaSkyboxRenderer.cs, everything under Dialogue. ## Notes - Old schema 1 JSON loads, but has no physical positions: anchors appear at the origin and links use their stored yaw/pitch until you place the anchors. - Panorama alignment sign is not verified in a real scene. If rotating an anchor turns the image the wrong way, report it. - Only one journey root per graph asset should be open at a time. ---