How mapbox/mapbox-unity-sdk works
The Mapbox Unity SDK provides interactive map rendering and also documents location, directions, and geocoding capabilities. In the visible map workflow, Unity initializes the map and its visualizer; loading a view computes tile coverage, loads the cover into memory, and displays a snapshot. Tile retrieval, rendering details, location integration, and API implementations are only partly represented in the excerpts, so uncertain connections are omitted or marked unverified.
Main entry points: MapboxMap.cs Map lifecycle · MapboxCacheManager.cs Cache manager · MapboxMapVisualizer.cs Tile visualizer · Tile.cs Tile lifecycle
Components 19
Map and tiles
- Map lifecycle
Runtime/Mapbox/BaseModule/Map/MapboxMap.cs - View settings
Runtime/Mapbox/BaseModule/Map/MapInformation.cs - Tile coverage
Runtime/Mapbox/BaseModule/Map/MapService.cs - Tile visualizer
Runtime/Mapbox/BaseModule/Map/MapboxMapVisualizer.cs - Tile identifiers
Runtime/Mapbox/BaseModule/Data/Tiles/CanonicalTileId.cs - Tile lifecycle
Runtime/Mapbox/BaseModule/Data/Tiles/Tile.cs
Data and caching
- Tile data
Runtime/Mapbox/BaseModule/Data/DataFetchers/MapboxTileData.cs - Fetch queue
Runtime/Mapbox/BaseModule/Data/DataFetchers/DataFetchingManager.cs - Cache manager
Runtime/Mapbox/BaseModule/Data/Platform/Cache/MapboxCacheManager.cs - SQLite cache
Runtime/Mapbox/BaseModule/Data/Platform/Cache/SQLiteCache/SqliteCache.cs - Cached tile records
Runtime/Mapbox/BaseModule/Data/Platform/Cache/SQLiteCache/Tiles.cs - Task scheduler
Runtime/Mapbox/BaseModule/Data/Tasks/TaskManager.cs
Unity runtime
- Unity context
Runtime/Mapbox/BaseModule/Unity/UnityContext.cs - Cache setup
Runtime/Mapbox/BaseModule/Unity/ModuleBehaviours/RuntimeCacheManagerBehaviour.cs
Location and APIs
- Location services
Runtime/Mapbox/LocationModule/MapboxLocation/MapboxLocationServiceObserverProxy.cs - Directions API
Runtime/Mapbox/DirectionsApi/RoutingProfile.cs - Geocoding
Other components
- Unity developer
- Mapbox services
Connections 21
- Unity developer → Map lifecycle: configures
README.md - Map lifecycle → Tile visualizer: initializes
Runtime/Mapbox/BaseModule/Map/MapboxMap.cs - Map lifecycle → Tile coverage: computes coverage
Runtime/Mapbox/BaseModule/Map/MapboxMap.cs - Map lifecycle → Tile visualizer: loads cover
Runtime/Mapbox/BaseModule/Map/MapboxMap.cs - Map lifecycle → View settings: reads view
Runtime/Mapbox/BaseModule/Map/MapboxMap.cs - Tile coverage → Tile identifiers: uses identifiers
- Tile visualizer → Tile lifecycle: loads tiles
- Tile lifecycle → Tile data: requests data
- Fetch queue → Tile lifecycle: initializes
Runtime/Mapbox/BaseModule/Data/DataFetchers/DataFetchingManager.cs - Fetch queue → Mapbox services: requests tiles
- Cache setup → Cache manager: creates
Runtime/Mapbox/BaseModule/Unity/ModuleBehaviours/RuntimeCacheManagerBehaviour.cs - Cache manager → SQLite cache: reads and writes
Runtime/Mapbox/BaseModule/Data/Platform/Cache/MapboxCacheManager.cs - Cache manager → Task scheduler: schedules work
Runtime/Mapbox/BaseModule/Data/Platform/Cache/MapboxCacheManager.cs - SQLite cache → Cached tile records: stores records
Runtime/Mapbox/BaseModule/Data/Platform/Cache/SQLiteCache/SqliteCache.cs - Unity context → Task scheduler: initializes
Runtime/Mapbox/BaseModule/Unity/UnityContext.cs - Unity developer → Location services: uses GPS
README.md - Unity developer → Directions API: requests routes
README.md - Unity developer → Geocoding: geocodes places
README.md - Directions API → Map lifecycle: renders route
README.md - Location services → Map lifecycle: centers map
README.md - Map lifecycle → Mapbox services: fetches map data
README.md