Static entry point and controller for the PanoShard Unity asset. Provides centralized access to core functionalities like loading locations, setting URLs, and managing segments. Automatically finds and caches the main TileLoader and SphereSegmentGenerator instances from the scene when first needed.
More...
|
| static bool | IsInitialized [get] |
| | Gets whether the Panoshard system has been successfully initialized with all required components.
|
| |
Static entry point and controller for the PanoShard Unity asset. Provides centralized access to core functionalities like loading locations, setting URLs, and managing segments. Automatically finds and caches the main TileLoader and SphereSegmentGenerator instances from the scene when first needed.
This facade provides a simplified API for common PanoShard operations. Components are lazily initialized on first use. For multi-scene scenarios or manual control, use Initialize or RegisterComponents to explicitly set component references.
◆ AreHotspotsVisible()
| static bool Reshardic.PanoShard.Managers.Panoshard.AreHotspotsVisible |
( |
| ) |
|
|
inlinestatic |
Gets whether hotspots are currently visible.
- Returns
- True if hotspots are visible, false otherwise or if TourManager is not available.
◆ CancelLoading()
| static void Reshardic.PanoShard.Managers.Panoshard.CancelLoading |
( |
| ) |
|
|
inlinestatic |
Cancels any ongoing loading operations.
◆ ClearTileCache()
| static void Reshardic.PanoShard.Managers.Panoshard.ClearTileCache |
( |
| ) |
|
|
inlinestatic |
Clears the tile cache, freeing up memory.
◆ GetCurrentLocation()
| static Graph.LocationInfo Reshardic.PanoShard.Managers.Panoshard.GetCurrentLocation |
( |
| ) |
|
|
inlinestatic |
Gets the location that is currently loaded (fully streamed/shown). When TourManager is present this reflects the confirmed-loaded location; otherwise it falls back to the TileLoader's last completed location.
- Returns
- The current Graph.LocationInfo, or null if no location has loaded yet.
◆ GetCurrentZoomLevel()
| static int Reshardic.PanoShard.Managers.Panoshard.GetCurrentZoomLevel |
( |
| ) |
|
|
inlinestatic |
Gets the current zoom level.
- Returns
- The current zoom level, or 0 if TileLoader is not available.
◆ GetHotspotPosition()
| static Vector3 Reshardic.PanoShard.Managers.Panoshard.GetHotspotPosition |
( |
Vector3 | position | ) |
|
|
inlinestatic |
Converts a hotspot position from UV to world coordinates.
- Parameters
-
- Returns
- The world position, or Vector3.zero if TileLoader is not available.
◆ GetSegmentGenerator()
◆ GetTileLoader()
| static TileLoader Reshardic.PanoShard.Managers.Panoshard.GetTileLoader |
( |
| ) |
|
|
inlinestatic |
◆ GetTourManager()
| static Controls.TourManager Reshardic.PanoShard.Managers.Panoshard.GetTourManager |
( |
| ) |
|
|
inlinestatic |
Gets the main TourManager instance.
- Returns
- The main TourManager instance, or null if not found.
◆ Initialize()
| static bool Reshardic.PanoShard.Managers.Panoshard.Initialize |
( |
bool | force = false | ) |
|
|
inlinestatic |
Explicitly initializes the Panoshard system by finding components in the scene. Call this during scene initialization if you want to control when initialization occurs.
- Parameters
-
| force | If true, forces re-initialization even if already initialized. |
- Returns
- True if initialization was successful and all required components were found.
◆ LoadLocation()
| static void Reshardic.PanoShard.Managers.Panoshard.LoadLocation |
( |
Graph.LocationInfo | location | ) |
|
|
inlinestatic |
Loads a specific location with optional delay.
- Parameters
-
| location | The location info to load. |
| delay | Delay in seconds before loading (must be non-negative). |
- Exceptions
-
| ArgumentNullException | Thrown if location is null. |
| ArgumentOutOfRangeException | Thrown if delay is negative. |
| InvalidOperationException | Thrown in development builds if TileLoader is not available. |
◆ RegisterComponents()
| static void Reshardic.PanoShard.Managers.Panoshard.RegisterComponents |
( |
TileLoader | tileLoader, |
|
|
SphereSegmentGenerator | sphereGenerator = null, |
|
|
Controls.TourManager | tourManager = null ) |
|
inlinestatic |
Manually registers component references instead of relying on automatic scene discovery. Use this for explicit control over which components the Panoshard facade uses.
- Parameters
-
| tileLoader | The TileLoader instance to use (required). |
| sphereGenerator | The SphereSegmentGenerator instance to use (optional). |
| tourManager | The TourManager instance to use (optional). |
◆ Reset()
| static void Reshardic.PanoShard.Managers.Panoshard.Reset |
( |
| ) |
|
|
inlinestatic |
Clears all cached component references and resets initialization state. Useful when transitioning between scenes or when components are destroyed.
◆ SetCachingEnabled()
| static void Reshardic.PanoShard.Managers.Panoshard.SetCachingEnabled |
( |
bool | enable | ) |
|
|
inlinestatic |
Enables or disables caching.
- Parameters
-
| enable | True to enable caching. |
◆ SetCdnUrl()
| static void Reshardic.PanoShard.Managers.Panoshard.SetCdnUrl |
( |
string | url | ) |
|
|
inlinestatic |
Sets the base CDN URL for tile loading.
- Parameters
-
| url | The CDN URL string. Pass null or empty to clear external URL and use StreamingAssets. |
- Exceptions
-
| InvalidOperationException | Thrown in development builds if TileLoader is not available. |
◆ SetHotspotsVisible()
| static void Reshardic.PanoShard.Managers.Panoshard.SetHotspotsVisible |
( |
bool | visible | ) |
|
|
inlinestatic |
Sets the visibility of all hotspots in the scene.
- Parameters
-
| visible | True to show hotspots, false to hide them. |
◆ SetMaxCacheSize()
| static void Reshardic.PanoShard.Managers.Panoshard.SetMaxCacheSize |
( |
float | sizeMB | ) |
|
|
inlinestatic |
Sets the maximum cache size in MB.
- Parameters
-
| sizeMB | Cache size in MB (must be positive). |
- Exceptions
-
| ArgumentOutOfRangeException | Thrown if sizeMB is not positive. |
◆ SetMaxLevel()
| static void Reshardic.PanoShard.Managers.Panoshard.SetMaxLevel |
( |
int | level | ) |
|
|
inlinestatic |
Sets the maximum zoom level for tiles.
- Parameters
-
| level | The max level (typically 0-6). |
- Exceptions
-
| ArgumentOutOfRangeException | Thrown if level is negative. |
◆ SetMinLevel()
| static void Reshardic.PanoShard.Managers.Panoshard.SetMinLevel |
( |
int | level | ) |
|
|
inlinestatic |
Sets the minimum zoom level for tiles.
- Parameters
-
| level | The min level (typically 0-6). |
- Exceptions
-
| ArgumentOutOfRangeException | Thrown if level is negative. |
◆ SetQualityPreset()
Sets the quality preset for rendering.
- Parameters
-
| preset | The quality preset. |
- Exceptions
-
| ArgumentNullException | Thrown if preset is null. |
◆ ToggleHotspotVisibility()
| static bool Reshardic.PanoShard.Managers.Panoshard.ToggleHotspotVisibility |
( |
| ) |
|
|
inlinestatic |
Toggles the visibility of all hotspots.
- Returns
- The new visibility state, or false if TourManager is not available.
◆ UpdateActiveSphereGenerator()
| static void Reshardic.PanoShard.Managers.Panoshard.UpdateActiveSphereGenerator |
( |
SphereSegmentGenerator | sphereGenerator | ) |
|
|
inlinestatic |
Updates the active SphereSegmentGenerator reference. Use this when switching spheres in scene streaming scenarios.
- Parameters
-
◆ UpdateSphereMaxSegments()
| static void Reshardic.PanoShard.Managers.Panoshard.UpdateSphereMaxSegments |
( |
int | newMaxDetailLevel | ) |
|
|
inlinestatic |
Updates the sphere's maximum detail level.
- Parameters
-
| newMaxDetailLevel | The new max detail level (must be non-negative). |
- Exceptions
-
| ArgumentOutOfRangeException | Thrown if newMaxDetailLevel is negative. |
◆ IsInitialized
| bool Reshardic.PanoShard.Managers.Panoshard.IsInitialized |
|
staticget |
Gets whether the Panoshard system has been successfully initialized with all required components.
The documentation for this class was generated from the following file:
- E:/unity-projects/giga-360/Assets/Plugins/Reshardic/PanoShard/Scripts/Runtime/Managers/Panoshard.cs