TourManager Runtime Modes
TourManager (Assets/Plugins/Revoid/GigaSphere/Scripts/Runtime/Managers/TourManager.cs) coordinates either tile-based streaming or scene-based loading depending on the selected runtimeMode.
Tile Streaming Mode
- When used: Default workflow for high-resolution panoramas hosted in StreamingAssets or a CDN.
- How it works:
runtimeModeremainsTileStreamingandTileLoadermust be assigned.LoadLocationcallsTileLoader.LoadLocation, which streams tiles using the active sphere generator and fades between levels.- Camera settings (rotation, FOV, pitch) are applied immediately via
ApplyCameraSettingsso the viewer does not see the previous orientation while tiles load. - Hotspots are instantiated through
LoadHotspots, which fetches prefabs fromResources/Runtime/Hotspots/<Type>and scales them against the active sphere radius. TileLoader.OnPanoramaLoadingCompleteoptionally re-applies camera settings when asynchronous loading finishes.
- Configure: Assign
tourGraphandloaderin the inspector. Optionally subscribe toOnHotspotSpawned/OnHotspotDestroyedfor runtime UI reactions.
Scene Streaming Mode
- When used: Each location has a bespoke Unity scene (for bespoke geometry, lighting, or authored hotspots) instead of shared tile streaming.
- How it works:
- Set
runtimeModetoSceneStreamingand provide aTourSceneManifestvia thesceneManifestfield; OR, useTools/GigaSphere/Scenes/From Graphto build everything automatically from existing Tour Graph. LoadLocationstarts the coroutineLoadLocationSceneRoutine, which resolves the additive scene path from the manifest and loads it viaSceneManager.LoadSceneAsync.- When the scene finishes loading, a
LocationSceneDescriptorin that scene must callTourManager.OnLocationSceneLoaded. The descriptor supplies the location reference and aSphereSegmentGeneratorthat becomes the new target forTileLoader. TourManagerdisables the previous sphere (and the bootstrapper sphere) before binding the new one, updates detail levels, and then triggers tile loading plus hotspot spawning after one frame throughDelayedHotspotSpawn.- Optional unloading: enable
unloadPreviousSceneto tear down the prior additive scene before activating the new one.
- Set
- Manifests: Maintain mappings inside
TourSceneManifest.SetEntries. The loader prioritizes lookups byLocationInfo.tilesFolder, then falls back to asset keys, instance IDs, and titles. Keep entries synchronized with your tour graph when adding or renaming locations.
Operational Notes
Reloadreevaluates the start location for both modes. When using scene streaming, ensure the manifest covers every start candidate; missing entries will log errors and abort loading.- Scene streaming still relies on
TileLoaderfor panoramic content once the descriptor binds the sphere. Keep the loader active even if the initial bootstrapper sphere is hidden. - Hotspot prefabs and data work the same in both modes. In scene streaming you can place additional hotspots directly inside the additive scene and call
TourManager.RegisterSceneHotspotfrom theirOnEnablelogic if needed.