Minor-version bump per semver: this release contains source-breaking API changes (listed below) alongside substantial feature work in camera/input, tile LOD, and terrain rendering. The 3.0.7 designation was previously used in development; published 3.0.7 builds, if any, are superseded by 3.1.0.
- Added
com.unity.burst@1.8.12. The terrain-RGB elevation decoder and the collider vertex-fill jobs are now Burst-compiled. First-time domain reload pays a one-shot AOT compile cost; runtime decoding is significantly faster. com.unity.inputsystemis recognized as a soft dependency. Projects without it continue usingUnityEngine.Input; projects with it automatically use the new Input System via aMAPBOX_NEW_INPUT_SYSTEMdefine wired throughversionDefines. No project-side action required either way. SeeDocumentation~/CameraSystem.mdfor details.
Source-level API surface:
IMapInformationgained a new member:TerrainInfo Terrain { get; }. Any project that ships its ownIMapInformationimplementation must add this property — return an instance ofTerrainInfo(defaults are fine for a non-terrain map). The built-inMapInformationalready implements it.TerrainData.ElevationValuesUpdatedis now declaredpublic event Action(was a plainpublic Actionfield). External code can subscribe with+=/ unsubscribe with-=as before, but direct assignment (= myCallback) and direct invocation (ElevationValuesUpdated()) no longer compile. Migrate to+=for subscription. The previous single-setterSetElevationChangedCallback(which silently wiped other subscribers) has been removed.MapboxTileData.SetDisposeCallbackwas replaced withpublic AddDisposeCallback(Action)/RemoveDisposeCallback(Action)(multicast). External code that previously assigned through reflection or an internal-visible-to dependency should switch to the add/remove pair; subscriptions are now safely shared across the up-to-16 render tiles that consume the sameTerrainDatainstance.TerrainData.IsDisposedis a newpublic bool(read-only). Async readback paths check this before assigning into the data; external consumers may also want to consult it.MapboxMapVisualizernow implements two new interfaces:IMapVisualizer(existing, no change).ITileLifecycleSource(new, inMapbox.BaseModule.Map): exposesTileLoaded/TileUnloadingevents,MapInformationproperty, andActiveTilesasIReadOnlyDictionary<UnwrappedTileId, UnityMapTile>via explicit interface implementation. The public concreteActiveTilesproperty still returnsDictionary<,>— no break for existing consumers.
- New opt-in marker interface
ITileLifecycleObserver(inMapbox.BaseModule.Map). Layer modules that need a visualizer reference for bookkeeping can implement it and the visualizer callsAttachToMapVisualizer(ITileLifecycleSource source)on them duringInitialize.TerrainLayerModuleimplements it for its terrain-bounds tracker; other modules are unaffected.
Custom imagery module:
CustomTMSTileconstructor extended from 4 args → 6 args: addedbool invertYandbool isMapboxService. The legacy 4-arg constructor (urlFormat,tileId,tilesetId,useNonReadableTexture) is preserved as an overload defaulting toinvertY: true, isMapboxService: false— external subclasses keep compiling. New code should use the 6-arg form to control invert-Y behaviour and Mapbox-signed request routing explicitly.CustomSource.CreateTilenow always returns aCustomTMSTilewhenUrlFormatis set, regardless ofInvertY. PreviouslyInvertY=falsereturned a plainRasterTile. If you relied on the plain-raster path with a non-emptyUrlFormat, setUrlFormat = ""to keep that behavior — emptyUrlFormatfalls back to plainRasterTile.CustomTerrainSource.CreateTilegot the same empty-UrlFormatfallback to plainRasterTileto matchCustomSource.CustomTerrainLayerModuleScriptnow passes the user-configuredSettings.DataSettings(cache size, retina flag, non-readable textures, data-zoom clamp) through toCustomTerrainSource. Previously a throwawayImageSourceSettingswas used and the Inspector values had no runtime effect. This is a behavioral break for users who hadDataSettingsset to non-default values — the values now actually apply.
Terrain settings:
TerrainInforemoved two fields that were written-but-never-read:IsEnabled(was unused) andExaggeration(no consumer). Remaining fields:MinElevation,MaxElevation. Plus new constantsDefaultMinElevation = 0fandDefaultMaxElevation = 5000f.- The previous
SetElevationChangedCallbackmethod onTerrainDatawas removed (replaced by the multicast event — see above).
Camera API:
- New
MapCameraBehaviour<T>open generic abstract base class. Concrete subclasses (SlippyMapCameraBehaviour,Moving3dCameraBehaviour) ship with the SDK. Custom cameras must subclass with a closed-type generic parameter. - New
MapInput.Teardown(IMapInformation)virtual hook. Existing subclasses ofMapInputmust override and unsubscribe any events they registered inInitialize— without the override the default is a no-op (no break, but recommended). - New
MapInput.TouchCountDecreasedThisFrameprotected property (read insideUpdateCamerato detect 2→1 finger pinch-end and re-seed drag origin). - New camera state mutator:
MapInput.CurrentTwoFingerGestureremoved from earlier review iterations — moved entirely insideTouchInputHandleras a private enum. External code can't depend on it (was never publicly exposed in v3.0.x).
Tile provider:
UnityTileProvider.MaximumZoomLevelis now silently clamped to 30 internally (was unbounded). Higher values would have overflowed1 << (_maxZoom - zoom)past 30. Practically unreachable in Mercator (pyramid maxes at 22-24), but any Inspector misconfig now produces a log warning instead of an overflow.UnityTileProvidernow warns at construction ifMinimumZoomLevel > MaximumZoomLevel.TileNode.Setinternal-shape signature changed from(id, worldCenter, scale, boundsHeight)to(id, worldCenter, scale, boundsBottom, boundsHeight). Internal API — only relevant if you subclassedUnityTileProviderand touchedTileNodedirectly.
Map visualizer:
MapboxMapVisualizer.MaxMercatorZoomis a newpublic const int(= 22). Replaces the magic literal inDelveInto. Available for external consumers that need to align with the SDK's pyramid cap.MapboxMapVisualizer.MapInformationis a new public property exposing the map info. Was previously a protected field only.
Removed from package:
TileProviderBenchmark.cswas removed from the SDK package. It was an internal tool that shouldn't have been included. The file is.gitignored so a local copy can be kept by developers who need it; users will not see it in the SDK.
Camera & input:
- New camera system with two concrete behaviours:
SlippyMapCameraBehaviour— fixed camera, map moves underneath. Best for 2D-style maps, navigation overlays, AR/VR.Moving3dCameraBehaviour— camera orbits a target point. Best for 3D city exploration, games, simulations. Both wrap aMapCameraBehaviour<T>generic base that handles theIMapInformationevent subscription lifecycle.
- Touch input support: single-finger pan, two-finger pinch zoom, two-finger same-direction vertical tilt. Pinch/tilt are mutually exclusive via a per-frame gesture decision in
UpdateInputState. Touch rotate is not implemented (mouse-only via right-click drag). - Input System soft-dependency support. The SDK reads through an
IPointerInputabstraction (legacy vs new system) selected at compile time byMAPBOX_NEW_INPUT_SYSTEM, with twoIInputHandlerimplementations (mouse vs touch) selected by build platform — Android/iOS device builds use the touch handler; Editor and Standalone builds use the mouse handler. There is no runtime fallback. Documentation~/CameraSystem.mdwalks through the camera setup, gesture mapping, and the Input System opt-in.
Tile provider / LOD:
- LOD overhaul:
- Forward-projected distance replaces euclidean distance.
- Exponential split threshold replaces screen-fraction.
- Acute-angle compensation (
DistToSplitScale) reduces detail for tiles viewed at grazing angles, ported from the native SDK'stile_cover.cpp. - Result: tile counts at high pitch are 40–60% lower vs the prior algorithm with comparable visual fidelity near the camera.
FrustumBuffersetting (world-space units; scales withmapInformation.Scale). Pre-loads tiles just outside the screen edges so panning doesn't pop in.- Reusable scratch arrays (
_corners,_planes,_quadrants,_pool) eliminate per-frame allocations inGetTileCoverandInternalUpdateCoroutine. - Sub-sea-level terrain handled correctly:
boundsBottomderived fromMinElevation/scale, so tiles below Y=0 (Death Valley, Dead Sea) no longer frustum-cull.
Terrain rendering:
- Burst-compiled decode of terrain-RGB into elevation float[] via
Sync/AsyncExtractElevationArrayBurstIJobs. Min/Max computed inline during decode (saves a second C# pass). - Burst-compiled collider vertex-fill (
BuildColliderVerticesJob) writing into a reusableNativeArray<Vector3>. Triangles regenerated only whenSampleCountchanges. - Async PhysX collider bake (when
asyncBakeCollider = true):Physics.BakeMeshruns on a worker thread;Mesh.sharedMeshassignment happens one frame later when the cooked-data cache is ready. Main-thread cost is near-zero. - Shader-mode tiles share a single flat render mesh (
TerrainSharedFlat) across the entire tile pool. Per-tile state (_HeightTexture_ST,_TileScale, etc.) goes viaMaterialPropertyBlockinstead of per-tileMaterialinstances — savesMaterialclone allocations across pool churn. - Bilinear elevation sampling in
TerrainData.QueryHeightData, the collider vertex job, and the shader bilinear subgraph. Replaces the prior nearest-neighbor(int)xxtruncation that produced visible stepping when render-tile mesh vertices sampled a denser sub-region than the data tile's effective resolution. ElevatedTerrainShader.shadergraphandMapboxTerrainBilinearSampling.shadersubgraphwere restructured during the bilinear-sampling and normal-banding work (ridge-band fix uses a 2-texel offset, per Option A in the prior investigation). Lighting and displacement look correct on eye-test against the example scenes. If a project ships custom shader variants derived from these graphs, re-verify after upgrading.TerrainInfoexposes observedMinElevation/MaxElevation(in meters) onIMapInformation.Terrain. Updated automatically as terrain tiles load/unload. The tile-provider's AABB andUnityMapTile.SetFallbackMeshBoundsconsume this to size the frustum-cull volume.- Conservative bounds fallback (
UnityMapTile.SetFallbackMeshBounds, 10000m) applied immediately on terrain-data attach so shader-displaced geometry doesn't get culled before real Min/Max arrive — or permanently, when CPU extraction is disabled. - Per-tile
MeshColliderconfigurable viaTerrainColliderOptions(inElevationLayerProperties). Supports placing the collider on a dedicated child GameObject + Unity Layer. - Bounds tracking is now an opt-in concern of
TerrainLayerModule(viaITileLifecycleObserver→TerrainBoundsTracker).MapboxMapVisualizeritself is terrain-agnostic.
Custom imagery:
- New
CustomSourceSettings.InvertYtoggle: whentrue, Y is(2^z - Y - 1)instead ofYin URL substitution (TMS-style). - New
CustomSourceSettings.IsMapboxServicetoggle: whentrue, the tile request is signed with the Mapbox access token; whenfalse, it's a plain HTTP request.
Editor / Inspector:
- New custom drawer for
[SimplificationFactor]attribute: dropdown of distinct-grid presets with a live HelpBox describing the resulting vertex grid + per-tile quad count. Legacy non-preset values now show a "migrate to a preset" warning instead of being silently snapped. Multi-object editing and prefab-override-safe viaBeginProperty/EndProperty. - New custom drawer for
TerrainColliderOptions: foldout with grayed-out sub-options whenaddCollideris disabled, further gated whenuseDedicatedColliderLayeris disabled. - New custom drawer for
TerrainSideWallOptions: same reveal pattern for skirt-wall settings. - New custom drawer for
[GameObjectLayer]attribute: Unity Layer dropdown forlayerIdfields. TerrainSettingsInspectorHelperwarns when extraction is force-enabled by other settings (UseShaderTerrain off, or collider on) and renders theExtractCpuElevationDatacheckbox as disabled+ticked. The previous OnGUI silent write toboolValuewas removed — no more silently dirtying inspected assets. Scene-scan for vector / components modules is cached and invalidated onEditorApplication.hierarchyChanged.
Other:
- New demo scene demonstrating how to use POI information.
- New documentation files added.
- Reorganized Mapbox context menu for creating Mapbox ScriptableObjects.
- Burst-compiled terrain-RGB decode: significantly faster than the prior C# loop.
- Burst-compiled collider vertex fill with persistent
NativeArraybuffers. ElevationArrayPool: poolsfloat[]buffers across cache evictions, capped at 32 per-size (MaxPerSizeDepth). Avoids ~256 KB / ~1 MB allocations per tile decode for 256² / 512² heightmaps. Returns past the cap drop to GC. In Editor, the pool clears on[RuntimeInitializeOnLoadMethod(SubsystemRegistration)]so stale buffers don't survive play-mode stop.DelveIntorewritten as iterative explicit-stack: eliminatesnew bool[4]+new UnwrappedTileId[4]allocations per cache miss (up to ~85 recursive calls × ~32 bytes before).MapboxMapVisualizer.LoadreusesunityMapTile.Childrenlists across pool cycles instead of allocating a fresh list per cache miss.TerrainBoundsTrackerrecomputes Min/Max fromActiveTilesonce per coroutine tick (deferred via a dirty flag) instead of on every tile event.TerrainData._cachedWidthcachessqrt(ElevationValues.Length)once onSetElevationValues—QueryHeightDatano longer recomputes per query.SimplificationFactorDrawercaches preset+label arrays per(Min, Max, VertexBase)tuple and reuses oneGUIContentfor HelpBox height calculation (was allocating per repaint).TerrainSettingsInspectorHelperscene scan no longer runsFindObjectsByType<MonoBehaviour>on every OnGUI repaint.
Tile pipeline:
- Fixed multicast dispose notification — shared
TerrainDatanow notifies all consumers on eviction (previously the single-setter callback silently dropped 15 of 16 sharing tiles). - Fixed
TerrainData.ElevationValuesUpdatedpreviously being a plainpublic Action, which letSetElevationChangedCallbacksilently wipe other subscribers. Now a proper multicast event. - Fixed
TerrainSource.ExtractElevationValuesusing the wrong overload ofExtractHeightData— theAction<float[]>overload + 1-argSetElevationValuesleftMin/MaxElevationat 0 on every tile loaded through the initial async path. Now uses theTerrainDataoverload (which sets Min/Max inline). - Fixed
TerrainSource.ExtractElevationValueshanging forever when async readback completes afterTerrainData.Dispose— the coroutine now subscribes to bothElevationValuesUpdatedand the dispose multicast and completes on either signal. - Fixed
Async/SyncExtractElevationArraynot guarding againstTerrainData.IsDisposed— late-arriving GPU readback callbacks would assign into evicted data and leak the rented buffer. Now both check before renting and after the decode; the rented buffer is returned to the pool when dispose arrives in the window. - Fixed
MapboxMapVisualizer.RecomputeTerrainBounds(now inTerrainBoundsTracker) not being wired toElevationValuesUpdatedfor shader-mode tiles — those tiles finish on texture-ready before CPU decode arrives, so the bounds never widened until extraction landed. Now a one-shot watcher per sharedTerrainDatatriggers the recompute. - Fixed terrain bounds remaining pinned at 0 when all loaded tiles were at/above sea level (previous accumulate-only
< terrain.MinElevationnever fired). - Fixed terrain bounds monotonically inflating over a long session —
TerrainBoundsTrackernow recomputes fromActiveTileson tile pool, so bounds tighten as the camera moves to lower-elevation regions. - Fixed
UnityTileTerrainContainer.SetTerrainData(null)silently leaking the priorTerrainData'sElevationValuesUpdatedand dispose-callback subscriptions. Detach now runs unconditionally before the null-return. - Fixed
UnityTileTerrainContainer.OnDestroynot removing the dispose callback (only theElevationValuesUpdatedhandler) — a later eviction would fire the multicast into a destroyed tile. - Fixed
UnityTileImageContainer.OnDestroybeing empty — same multicast-leak pattern as the terrain container.
Terrain strategy / collider:
- Fixed CPU-elevation render mesh leak via
MeshFilter.meshclone path.CreateElevatedMeshnow reads.sharedMesh(the.meshgetter implicitly cloned the assigned shared mesh and orphaned the original). Per-tile mesh is now explicitly namedTerrainCpuMeshsoUnityMapTile.OnDestroycorrectly disposes it. - Fixed
_sharedFlatMeshbeingClear()'d on a shader→CPU transition whensampleCountor_useTileSkirtschanged at runtime — would wipe geometry for every other shader-mode tile pointing at the shared mesh. Now allocates a fresh per-tile mesh first. - Fixed
_sharedFlatMeshleaking on a secondInitializecall.Initializenow destroys the previous one before allocating. - Fixed
MeshCollider.cookingOptionsonly being set at component creation — when an existing collider's cooking options diverged from the bake's, PhysX silently re-cooked synchronously on assignment, defeating the async-bake path. Now assigned every call. - Fixed
CompleteBakeAndAssignnot null-guarding the new mesh afterJobHandle.Complete()— a parallel bake completion couldDestroy()our mesh as its "previous" before we got to assign it. - Fixed
_elevationNativeMirrorcache key being thefloat[]reference.ElevationArrayPoolrecycles buffers, so the samefloat[]could be re-rented for different data and produce a false cache hit. Now keyed byTerrainDatareference. - Fixed
RegisterColliderdeferred path adding a closure for every temp→final re-invocation, doubling async-bake work. Now de-dups by(tile, data). - Fixed deferred-rebuild closures rooting
tileanddatawhenTerrainData.Disposearrived beforeElevationValuesUpdatedfired. Closures now self-detach on both signals. - Fixed
_lastColliderBuild(collider build cache) growing with deadMeshColliderkeys — Unity's overloaded==doesn't reachDictionary<K,V>'s reference equality. Opportunistic sweep +Clear()onOnDestroy. - Fixed mesh-name string duplication:
TerrainColliderMeshName,SharedFlatMeshName,TerrainCpuMeshNameare nowpublic constonElevatedTerrainStrategy. The dedicated-collider-layer GameObject name renamed from"TerrainCollider"to"TerrainColliderChild"to disambiguate from the mesh name.
Tile provider:
- Fixed
UnityTileProvider.ShouldSplitoverriding the per-corneroffset.yto+cameraHeight— correct in the native SDK's tile-coordinate system but flipped the sign of the vertical dot-product contribution in Unity's world units, triggering "always split" for downward-pitched cameras. Now uses ground-plane projection (offset.y = 0f). - Fixed
UnityTileProvider.DistToSplitScaledividing bydzwith no zero guard — camera-at-ground (dz=0) produced NaN/Inf and pinned the tile toMinimumZoomLevel. Now short-circuits withreturn 1fwhendz < 0.0001f. - Fixed
UnityTileProvider.ShouldSplitalways-split for behind-camera corners recursing all the way to_maxZoomon tilted views withFrustumBufferexpansion. Now capped atzoom < 18(AlwaysSplitSafeCap). - Fixed
UnityTileProvider.FrustumBuffertooltip not mentioning that the value is in world-space units that depend onmapInformation.Scale.
Camera & input:
- Fixed
MAPBOX_NEW_INPUT_SYSTEMdefine gating being broken — theversionDefinesentry that defined the symbol was uncommitted. Projects with "Active Input Handling = New" only would crash on every legacyUnityEngine.Input.*call. - Fixed
MapboxExamples.asmdefrequiringUnity.InputSystemas a hard reference, breaking projects without the package. Now relies on the InputSystem asmdef'sautoReferenced: trueresolution; absent → no reference, no compile error. - Fixed scroll-zoom delta magnitude differing ~10× between legacy and new input paths on Windows (legacy
Input.GetAxis≈ 0.1/notch, newscroll.y≈ 120/notch). Normalized to ~0.1/notch on both. - Fixed pan jump after a 2-finger pinch drops to 1 finger — the new "primary" touch could be at a different screen position than the lifted one. Now re-seeds drag origin on
TouchCountDecreasedThisFrame. - Fixed pinch and tilt detectors both firing on the same frame (each computed dominance independently and
GetPinchZoomDeltaupdated_previousPinchDistanceregardless of which won). Decision now made once per frame inUpdateInputState. - Fixed pinch/tilt thresholds being in pixel units (DPI-dependent). Both magnitudes now normalized to
Screen.height; pinch wins ties (no dropped frames on near-vertical pure-tilt drags). - Fixed pinch state corruption across 2→3→2 finger transitions. EnhancedTouch reorders
activeToucheson add/remove, so the next frame would compare distance against a different physical pair. Now tracks the touch ID pair and reseeds on change. - Fixed
Moving3dCamera.Zoom()NaN propagation throughpreDistance,camDistanceToMouse, and the lerp output. Top-down ortho / first-frame /mapInformation.Scale=0/ camera curve evaluating to 0 all hit the guards now. - Fixed
MapCameraBehaviour.AwakeNRE when noMapBehaviourCoreexists in the scene. Logs an error and disables the component instead. - Fixed
MapCameraBehaviournever unsubscribing fromMapBehaviour.Initialized— leak across scene reload. - Fixed
MapCameraBehaviournot tearing downIMapInformationevent subscriptions registered by the camera core (LatitudeLongitudeChanged,ViewChanged,SetView) — the closures rooted the destroyed camera and itsCameraTransform. NewMapInput.Teardownvirtual hook +OnDestroywiring. - Fixed
MapCameraBehaviour.OnMapInitializednot tearing down a previousMapInformationif the event fires twice (defensive — not currently exercised by example scenes). - Fixed
SlippyMapCamera.InitializedereferencingFindObjectOfType<MapBehaviourCore>().transformwithout a null check. - Fixed
SlippyMapCamera.CenterLatitudeLongitudebeing overwritten every frame even when nothing moved, with aMathf.Clamp((float)Latitude, …)downcast losing precision at z18+. Now gated on_output.HasChangedand usesSystem.Math.Clampon doubles.
Map visualizer:
- Fixed
MapboxMapVisualizer.RemoveUnnecessaryTilespreviously exemptingFillertiles from removal — caused orphaned-filler z-fighting. Now eligible for pooling; visual continuity preserved by the temp-tile filler protection pass inLoad(). - Fixed
MapboxMapVisualizer.OnDestroynot detaching pending elevation-decode watchers — closures kept sharedTerrainDatarooted past the visualizer's lifetime. Tracker (now inTerrainBoundsTracker) handles this in itsDispose. - Fixed
LoadingState.Fillerchildren of currently-loading temp tiles being pooled when they're still needed for visual continuity. Filler protection pass inLoad()removes their ids from_toRemove.
Custom imagery:
- Fixed
CustomSource.CreateTilethrowingArgumentNullExceptionfromstring.Format(null, …)whenUrlFormatwas empty. EmptyUrlFormatnow falls back to plainRasterTile. - Fixed
CustomTerrainSource.CreateTilemissing the same empty-UrlFormatfallback. - Fixed
CustomTerrainLayerModuleScriptnot passing the user'sDataSettingsthrough to the source — Inspector values had no runtime effect. - Restored 4-arg
CustomTMSTileconstructor as a backward-compat overload (binary break for external subclasses otherwise).
Editor / Inspector:
- Fixed
SimplificationFactorDrawersilently snapping legacy non-preset values to the nearest preset duringOnGUI— dirtied every inspected asset on first paint. - Fixed
SimplificationFactorDrawermissingBeginProperty/EndProperty— broke prefab-override and multi-object editing. - Fixed
SimplificationFactorDrawer.GetPropertyHeightreturning a different height than the rendered HelpBox content for legacy values — caused HelpBox to clip into the next Inspector row. - Fixed
TerrainColliderOptionsDrawer.GetPropertyHeightreturning one extraline + spacing(cosmetic gap at the bottom of the foldout). - Fixed
TerrainSettingsInspectorHelperwritingchild.boolValue = trueduringOnGUI— silently dirtied every inspected asset. Now display-only (runtime evaluatesNeedsCpuElevationdirectly). - Fixed
TerrainSettingsInspectorHelper.SceneHasFeaturesNeedingCpuElevationrunningFindObjectsByType<MonoBehaviour>on every Inspector repaint. Cached and invalidated onEditorApplication.hierarchyChanged. - Fixed
Runtime/Mapbox/VectorModule/ComponentSystem/Editor/missing an asmdef — editor scripts (BuildingLayerVisualizerObjectEditor,ExtrusionOptionsDrawer,MapboxComponentsModuleScriptEditor) were being folded into the runtimeMapboxComponentSystemassembly, pullingUnityEditorreferences into player builds. NewMapboxComponentSystem.Editor.asmdef(Editor-only, references the runtime asm +MapboxBaseModule) keeps them out. - Fixed
MapboxMapBehaviour.CreateMapVisualizersilently producing a magenta tile material in player builds when noTileCreatorBehaviourwas assigned. The previous fallback usedShader.Findto construct a Material at runtime, butShader.Findonly resolves shaders referenced from a shipped Material or listed in Project Settings → Graphics → Always Included Shaders — so the shader was stripped from builds andnew Material(null)produced magenta tiles. Replaced with a new[SerializeField] protected Material _defaultTileMaterialonMapboxMapBehaviour; the asset reference keeps the shader alive in builds. Demo scenes (LocationExample.unity,ApiTest.unity) ship with this field wired toElevatedTerrainMaterial.mat. If both_tileCreatorBehaviourand_defaultTileMaterialare null, anInvalidOperationExceptionis thrown with actionable instructions. - Fixed
UnityTileProviderSettings.SubdivisionBiasdefaulting to0in scenes saved before the field existed — Unity assignsdefault(float)for missing serialized fields and does NOT run the C# field initializer in that case, which collapseddistToSplitand forced the tile provider to render only theMinimumZoomLeveltile. New C# default is0.6f;ISerializationCallbackReceiver.OnAfterDeserializeupgrades legacy serialized<= 0values to0.6f.
Other:
- Fixed
TerrainData.QueryHeightData(Vector2)and(float, float)overloads not guarding against nullElevationValues— shader-only mode (ExtractCpuElevationData=false) hit the NRE. - Fixed
TerrainData.Disposenot being idempotent — explicitIsDisposedbail at top. - Fixed
MapboxTileData.SetDisposeCallbackpreviously silently overwriting other subscribers when oneTerrainDatawas shared across 16 render tiles (the single-callback API). Replaced with multicastAddDisposeCallback/RemoveDisposeCallback. - Fixed
1 << (_maxZoom - zoom)shift overflow risk inUnityTileProvider.ShouldSplitwhen_maxZoomexceeded 30. Now clamped internally. - Fixed vector layer range limits not being applied correctly during data processing.
- Fixed incorrect limit validation and bounds checking in the
LatitudeLongitudestruct. - Fixed
MapInformation.Initializenot resettingTerrain.Min/MaxElevationto defaults — previous run's values could bleed into a fresh session. - Fixed Android IL2CPP player builds with Medium Managed Stripping Level silently dropping every SQLite tile cache insert with a
ConstraintForeignKeyerror. Sqlite-net populates row values via reflection (PropertyInfo.SetValue), but IL2CPP stripped the auto-property accessor methods (set_id,set_name, etc.) on the cache's model classes —SetValuethen became a silent no-op, every read returnedid = 0, and downstreamtilesinserts failed the foreign key ontile_set. The four SQLite model classes (tiles,tilesets,offlineMaps,tile2offline) and every one of their persisted properties now carry[UnityEngine.Scripting.Preserve], and the same types are declared inPlugins/link.xmlas a secondary safety net. Map rendering was unaffected (memory cache covered it) but the SQLite disk cache wasn't actually persisting under Medium. Stripping support after the fix: Low (and below) is the tested target; Medium has been briefly verified and seems to work; High is untested but expected to work given the same preservation. Additionally, theError inserting …log line now includes SQLite's extended error code (ConstraintUnique/ConstraintForeignKey/ConstraintNotNull/ etc.) so future cache-side failures are diagnosable from the first line. - Fixed
MapboxMapVisualizerwritingtile.transform.position(world space) on every tile cover update, which silently reset any parent transformation on theMapRoot/BaseTileRoothierarchy. Tiles are now positioned viatransform.localPosition, so translating or rotating the map's root (e.g. anchoring it to anARAnchor) is honored. For unchanged scenes —MapRootat world origin with identity rotation — behavior is identical. Non-unitMapRoot.localScaleis still unsupported; drive map scale throughMapInformation.Scaleinstead. - Fixed vector content (buildings, areas, roads from
VectorLayerVisualizerand the ComponentSystemAreaComponentVisualizer/RoadComponentVisualizer) failing to follow the same MapRoot parent transform as the terrain tiles. Two distinct issues compounded each other. (1) Four call sites were writing world-space positions on the vector hierarchy: the per-layerGameObjectOffsety-offset in both component visualizers, theSettings.Offsetapplication +_layerRootObject.transform.position.x/zreads insideVectorLayerVisualizer.UpdateForView, andMapShifterCore.UpdatewritingRuntimeGenerationRoot.position -= viewCenterPosition. All converted tolocalPosition. (2)Transform.SetParent(parent)defaults toworldPositionStays: true, which makes Unity preserve world transform by writing inverse-parent-rotation into the child'slocalRotation. Auto-created roots (BaseTileRoot,RuntimeGenerationRootinUnityContext, and every per-layer_layerRootObject+ pooled entity GameObject in the vector visualizers) hit this path on initial parenting, ending up with alocalRotationthat counter-rotated the entire vector subtree against MapRoot. All fiveSetParentcall sites now passworldPositionStays: false, with explicitlocalRotation = Quaternion.identityon the visualizer roots as defensive belt-and-suspenders. Buildings, areas, and roads now rotate / translate with the rest of the map under AR/MR-style parent transforms.
- New
Documentation~/Migration-3.0-to-3.1.mdwalks through every source-level break, every behavioral change, and step-by-step verification when upgrading from v3.0. README.mdrewritten and now serves as the single landing page (Overview.md merged in and removed). Adds a quick-facts header table, dependency listing, demo-scenes table, iOS / Android build sections with the v3.1.0 stripping notes, modules table, and a complete documentation index.Documentation~/GettingStartedWithMapboxMapObject.mdgained a "Place a GameObject at a latitude / longitude" recipe — the most commonly asked indie use case (drop a marker / character / POI at specific coordinates), with the correctlocalPosition+MapRootparenting pattern and the optionalTryGetElevationstep.
- Added editor-mode tests for
ElevationArrayPool(rent / return / pool cap / null safety),TerrainInfo(defaults), andMapInformation(Initialize resets terrain bounds, lat/lon, idempotency). First test coverage for v3.1.0 surface — more coming in v3.2.
- Fixed the Prefab Modifier to correctly scale generated objects to fit world size, depending on a setting.
- Fixed Height and Chamfer Height modifiers to consider the current location’s latitude when calculating building height.
- Fixed Line Mesh Modifier to scale line width according to map scale and latitude.
- Fixed a bug in the Prefab Modifier that blocked mesh generation when no prefab was assigned.
- Moved the
Layer Typesetting from the Layer Visualizer to the Modifier Stack to better support multiple stacks per visualizer. - Added
MapInformation.GetLatitudeCompensationForLocation, a method for getting more realistic distance estimates from Mercator units. - Added
Conversions.TileEdgeSizeInMercator, a simpler helper method for scale-related calculations. - Improved the inspector UI for the Height and Chamfer Height modifiers.
- Updated filters:
- Removed the Feature Data filter.
- Introduced a Geometry Type filter.
- Refined String and Number Property filters for better usability.
- Removed the Point Layer Visualizer, which became unnecessary after the structural changes above.
- Removed the Terrain Type setting, as it now only had a single valid option after recent updates.
Bug fixes, performance improvements, vector module changes, and core library updates for Android 16KB page size compatibility.
- Fixed a bug in Cache Manager where it didn't fail safely when no file cache was available.
- Fixed low-performing events and callbacks in UnityMapTile class and its data container objects.
- Fixed an issue where the memory cache failed when runtime mesh generation on worker threads modified non-thread-safe lists.
- Fixed a bug where Source classes did not fully verify if requested data was already being processed.
- Fixed a bug where the Vector Module did not handle all mesh generation task results properly.
- Updated MapboxCommon library to ndk27-24.10.0 for 16KB page size support.
- Updated SDK license to Mapbox License.
- Improved performance in the CanonicalTileId struct.
- Refined the Modifier Stack inspector UI.
- Changed the default map script to start with sample location and view parameters for an easier setup.
- Updated the default map script and tile creator to use the default Mapbox terrain shader without requiring manual assignment.
- Refined Vector Module’s tile retention and unloading logic.
- Added a new Layer Visualizer setting
Layer Typeto define positioning and scaling strategies for runtime-generated meshes. - Added
PointLayerVisualizerclass for better handling of point-type data (such as POIs). - Improved the UI and debugging tools of
LoggingDataFetchingManagerBehaviourandLoggingCacheManagerBehaviourscripts. - Enhanced the inspector UI for
LayerModifierand introduced the newTagModifierGameObject modifier. - Moved the LatitudeLongitude struct to its own file and added proper equality methods.
- Replace C# 9.0 syntax with C# 7.0 syntax for better backward compatibility.
- Added new starter guides:
- Getting Started with MapboxMap Object
- Coordinate Conversions
- Working with Modules
- Working with POIs
- Merged
MeshGenerationUnitback into the Vector Module as it no longer provided value. - Updated Vector Module behavior to avoid caching GameObjects outside of the current view.
- Vector Module now dynamically creates and destroys objects as they enter or leave the camera frustum for improved memory and cache management.
- Removed
OnVectorMeshTurnVisibleandOnVectorMeshTurnInvisibleevents, and fixedOnVectorMeshCreatedandOnVectorMeshDestroyedevents.
Performance (cpu and memory usage) improvements, bug fixes, library and Android/iOS compatibility updates, improved test coverage
Fixes
- Fix terrain shader (ElevatedTerrainShader) to create normals for terrain in runtime
- Fix a bug where VectorModule.GetTileCoverCoroutines only covered the data load but not the visual creation
- Fix file data fetcher to set data status properly
- Fix a bug where texture non-readable flag set wrong
- Fix a bug where settings memory cache size to zero didn't work
- Fix UnityContext to use BaseTileRoot and RuntimeGenerationRoot settings properly
- Fix an issue where static and terrain layer modules didn't do a complete tile rejection check like vector module does.
- Fix MapVisualizer to handle null coroutine pointers
Improvements
- Change Mapbox shaders to support built-in rendering pipeline and HDRP along with URP
- Remove type parameter from IMapVisualizer.TryGetLayerModule method
- Refine Temp/Final tile creation process and methods
- Refine cache manager methods both for clarity and support better testing
- Update Mapbox Attribution prefab for clarity
- Rework polygon collision filter and meshOnLine modifier
- Remove terrain strategy from tile creator script (it's back to terrain module)
- Change elevated terrain strategy script to update tile mesh bounds after elevation is applied
- Change elevated terrain strategy script and terrain data script to keep track of min and max elevation values in the tile
- Restructure elevation data extraction scripts for clarity and easier usage
Other Changes
- Update Mapbox Common Library to 24.10.2 to support latest xCode
Fixes
- Resolved an issue where completed vector mesh generation tasks were not properly cleaned up.
- Fixed a problem with basic linear/trilinear texture sampling in terrain which caused spikes at certain elevation ranges.
- Fixed a bug where the initial map loading process fetched an incorrect set of tiles, requiring a second pass to load the correct data.
- Resolved an issue where tile mesh sidewalls/skirts were not generated correctly.
- Fixed a bug where the Data Fetching Manager and Cache Manager did not invoke callbacks in some scenarios.
- Corrected the Vector module’s use of the rejection limit setting for tile level calculations; it now correctly uses the data clamp limit.
- Addressed compatibility issues with certain core Android libraries that caused errors on older Android devices.
- Fixed CPU-based terrain generation (disabling the
Use Shader Terrainsetting). While slower than the GPU shader approach, this option remains useful for certain scenarios.
Improvements
- Updated the terrain system: the elevated terrain and its settings have been moved back to the Terrain module. The flat terrain option has been removed—omitting the Terrain module now results in a flat map, while including it generates elevated terrain.
- Removed the
Load Background Datasetting from the Vector module. It is now always enabled.
Other Changes
- Removed several debug-related string fields that were no longer in use.
- Merged the previously separate
getandreadExpirationprocedures in the SQLite implementation. - Restructured and simplified data classes related to the task system.
- Removed the GPU-based Linear/Gamma colorspace check, which is no longer necessary following terrain shader fixes.
Critical fixes and improvements for developers using Windows OS and developers using Unity 6.0
Fixes
- Fix the android build problems with Unity 6.0. Settings files and android build procedure has changed, you can check the ReadMe file for the new instructions.
- Fix a bug where long-term cache wasn't working as intended during development time on Windows machines.
- Fix a bug where caching system caused app freezes on launch.
- Fix a bug where JsonUtility couldn't parse response JSON on IL2CPP builds.
- Fix LoadView procedure which allows developers to (controllably) jump to different locations on map.
- Fix the compilation issues in the test module.
- Fix and update the MapDebug module.
- Fix a bug where vector module didn't respect zoom level limits on first view load.
- Fix a bug where the root object for runtime generated vector entity visuals didn't position correctly.
- Fix a bug where vector layer module didn't update position of visuals from unloading tiles
- Fix a bug where TileJson was calling the callback method twice
- Fix a bug where file and sqlite caches didn't handle custom database and folder names correct
New
- Add TileLoaded and TileUnloading events to MapboxMap class, along with LoadViewStarting and LoadViewCompleted events.
- Add MapboxAttribution prefab
- Add ability to enable/disable telemetry collection through attribution prefab
Improvements
- Change the scheduling system in data fetching and task management systems to decrease the complexity, making it easier to control and improve performance on highly dynamic maps.
- Add new settings under image, terrain and vector modules to help limit and control their work.
- Change TileCreator class to work through an interface.
- Fixes a bug where add collider feature didn't work for flat terrain mesh.
- Fix a bug where vector tile processing fired multiple times depending on Terrain/Image data states
- Improves Directions factory and prefabs to provide better UX and support for all types of maps
10/15/2019
- Fixes a bug where users were being double counted on mobile platforms
- Fixes a bug which send incomplete telemetry events.
09/20/2019
- Editor Preview - Adds ability to preview maps in editor at design time. AbstractMap now has an
Enable Previewtoggle which displays the map with all current settings, and provides ability to modify settings while viewing the map outside of Play mode. - Pricing Update - Introduces new pricing framework.
- Improves line mesh generation, adds options for join and cap types. Users have greater control over quality and styles of line meshes.
- Improves terrain tile loading times by optimizing terrain pipeline.
- Remove UV Modifier class and merge the functionality into polygon mesh modifier.
- Optimized Vector feature textures, resulting in smaller file sizes.
- Fixes a bug with UV calculation which caused textures to be stretched instead of tiled.
- Fixes a bug where Vector feature layers that used the same texture style would not preserve layer-specific style parameter settings.
- Fixes a bug where decoration spawning (SpawnInsideModifier) placed objects at wrong locations on recycled tiles.
- Fixes a bug where point placement didn't pate point location properly when zoom level changes.
10/15/2018
- Runtime editing of map features - Map elements like Imagery, Terrain, Feature Properties can now be updated during runtime, using AbstractMap UI in the Editor , or by using the API methods.
- Map API’s - Maps SDK for Unity now has API methods to build and edit maps entirely using scripts.
- Improves fallback for terrain tiles with missing or no data. Image will be now rendered on flat tiles instead of blank tiles.
- Improves terrain height query by using local position/rotation/scale of a tile. Use
QueryElevationInUnityUnitsAtorQueryElevationInMetersAtAPI methods to query height. - Terrain module “Sample Count” property changed to a slider.
- Improves tile loading and recycling performance.
- Fixes issue where Terrain was not turned off with
Noneoption. - Fixes issue where Node Editor script was throwing a compilation error due to deprecated API in Unity 2018.2
- Fixes issue where SnapToZero moved the map for each new tile loaded instead of only using the first one.
- Fixes issue with the height modifier where floor height calculations were wrong causing overlapping floors.
- Fixes issue where dispose buffer setting was being ignored by
RangeAroundTransformextent type. - Fixes builds for UWP/ Hololens environments.
- Fixes issue where ARTableTop map would not snap to the detected plane on zooming in/out.
- Fixes issue where
BuildingsWithUniqueIdssetting was getting applied incorrectly, resulting in missing buildings.
- Any
Featurelayers underMap Layersusing aCustomstyle type will need to be re-assigned through the AbstractMap UI. This change was necessary to persist custom style options when switching between different styles.
08/20/2018
- Added a ReplaceFeatureCollectionModifier class that allows multiple ReplaceFeatureModifiers to be run from one modifier.
- Added seven hero structures - Transamerica Pyramid, Coit Tower, Salesforce Tower, Empire State Building, Chrysler Building, One World Trade Center, Statue of Liberty.
- Added color option to texturing style
- Added color palettes drop down to Simple texturing option. Allows users to choose between different color palettes.
- Improvements to Tile states and map states. Map extent finished state is robust and deterministic.
- Removed dependency of Tile Providers on Update methods.
07/10/2018
- Selecting
SimpleTexturing Style in aVector Layer Visualizerexposes a drop down menu which allows users to select a color palette for that layer.
- Added 2 examples to the setup dialog
- AstronautGame - enhanced version of the Location Based game with custom styling and Astronaut asset
- TrafficAndDirections - example built around using Mapbox's traffic data layer and directions API
- Fix an issue with factories where a racing condition causing tiles without imagery
- Fixes the issue with Replacement Modifier to prevent duplicate prefab spawning and blocking wrong features.
- Fixes the issue with custom styles that go missing after building to a device.
- Fix an issue with factories where a racing condition causing tiles without imagery
- Added a separate Traffic and Directions demo scene
- Changed loft modifier to stretch texture horizontally
- Changed Directions Factory to check waypoints on timer and recalculate path if there's a chance
06/18/2018
- Added a Feature Replacement Modifer that allows replacement of a vector feature at a given Latitude,Longitude with a supplied prefab. Enables replacing a procedurally generated building at a given Latitude,Longitude with a custom 3D model.
- Texturing Style dropdown now allows users to select from prepackaged texture styles or custom, which allows for user-defined texturing.
- Mesh and GameObject modifiers can now be created and added to AbstractMap via
Add Newbuttons. - Example scene
LocationProvidercan be used to log GPS traces. See documentation on how to copy logs from devices. - GPS traces can be played back in the Editor with
EditorLocationProviderLocationLog. UserHeadingandDeviceOrientationvalues can be smoothed via different smoothing algorithms.
- Improvements to UV mapping for side walls of extruded polygons when using atlas textures. Enables better handling of leftover areas when creating columns.
- DeviceLocationProvider should work on devices. Tested with iPhone 7/8/X, Google Pixel 2, Samsung S8, Samsung Galaxy Note 8, OnePlus 3
- Fix issue with UvModifier which caused wrong roof uv positions calculations.
- Fix issue with data fetcher to handle failed connections properly, which caused IndexOutOfRangeException during tile loading/unloading.
- Fix issue with ambient file caching on Windows with .NET4.6 runtime and long file names. #825 #815
- ARInterface related errors and crashes on Unity 2018.1.1f1 related to bug in Unity https://issuetracker.unity3d.com/issues/vuforia-gameobject-transforms-are-not-being-disabled-when-the-player-is-stopped
05/14/2018
- Layer names and property names are preloaded from the data source into a dropdown.
- Add
Location Prefabssection toAbstractMap. Enables users to spawn prefabs at points-of-interest on the map directly from theAbstractMapUI. - Add options to spawn prefabs on points-of-interest using
Mapbox Category,Name, or a list ofAddress or LatLon. - Add methods on
AbstractMapto spawn prefabs. Enables users to add layers via script. - Add the
LocationPrefabs.unityexample scene. Demonstrates the basics of using theLocation Prefabsfeature. - Add
OnUpdatedevent toAbstractMap. Enables subscribers to get a notification when the map location and/or zoom gets updated. DeviceLocationProviderAndroidNative: a native location provider for Android that directly accesses location and orientation provided by the operating system not using Unity'sInput.locationwhich has some shortcomings, eg coordinates truncated tofloatprecision. Only available on Android 7.0 (Nougat, API Level 24) and up!EditorGpsLogLocationProvider: an Editor location provider to replay real world GPS traces logged with GNSSLogger- New example scene showing
UserHeadingandDeviceOrientation
UnityARInterfaceupdated to commit 67351b6 from March 1st 2018- Additional properties on
RotateWithLocationProviderto account for newLocationpropertiesUserHeadingandDeviceOrientation. - Changes to terrain factory (#623)
- Create a new base class
- Introduce all different terrains as strategies
- Change sidewalls as a property on elevated terrain strategy
- Data Fetching Changes (#622)
- Move data calls from factories to DataFetcher classes
- Factories register to events in DataFetchers
Layer Name,Extrusion Property NameandFilter Keyare now selectable dropdowns indicating the layers and properties available in the currentData Source. Layers and properties no longer require manual string entry.
- Added checks to prevent NRE in
GeocodeAttributeSearchWindowwhen searching with an invalid token or no connection. - Fix issue where side wall mesh generation did not work with elevated terrain.
- Fix issue with scaling prefabs for POI's. Enables correct scaling of objects with map.
Filterswith empty key or value parameters will exclude all features in a layer.- SDK will throw
[Physics.PhysX] cleaning the mesh failederror if a MapFeature is used with the following options: {Primitive Type:Line, LayerName:Road, Collider Type:Mesh Collider}
- Property
HeadingonLocationobject has been split intoUserHeadingandDeviceOrientation.UserHeading: the direction the user is moving. This is calculated from the latest position. If the user stops moving the last heading value is kept.DeviceOrientation: value obtained from the device compass. Where the device is looking to.
04/17/2018
- Add two new modules, KdTreeCollection and AddToCollection Gameobject modifier.
- Add Collider option for vector features.
- Add scale factor for extrusion value derived from feature property.
- Add camera script with zoom & pan support for TabletopAR scene.
- Remove
buildingsWithUniqueIdssetting forMapbox Streetsdata source. - Change
Style NametoData Source - Fix to make filter values case insensitive.
- Fix issue where position vector features was not being set.
- Fix
Range Propertyextrusion option for vector features. - Select newly created layer visualizer.
- Fix typo in colorPalette.
- Add defaults for all sublayer properties to not carry over any options from the previous layer.
- Don't allow empty names for layer visualizers.
- Fix foldouts not retaining states between play mode & editor.
- Add missing tooltips.
- Fix issue with Satellite TextureType.
- Added a check to prevent NRE on tile update because map was not initialized.
- Added method to disable
InitializeOnStartin theInitialize With Location Providerscript. - Fix loop counter in
SpawnInsidePrefabModifierwhich was causing an infinite loop.
03/20/2018
- Drag and drop prefabs for most common use cases.
- New Abstract Map UI
- Style development - colorization and atlas template generator
- Use texture atlas for building geometries.
- Merge buildings with unique ids using the experimental 3D buildings tileset.
- Added a API call on AbstractMap to query height at a certain latitude longitude.
- Included EditorConfig file to enforce coding style
- Integration of previously seperate AR support #544
12/18/2017
- As always, if you already have a project with a previous version of the SDK, please remove older versions before installing this new one!
FeatureBehaviouris no longer added to feature gameobjects by default. Use aFeatureBehaviourModifierto add this component (optimization).TextureModifieris obsolete. Please useMaterialModifier.LocationProviderhas been heavily modified to support additional features. Please update you references accordingly.MeshFactoryandPoiVisualizerhave been deprecated (previously obsolete).
- Added ability to use coroutines inside
VectorLayerVisualizer—this option will help prevent locking main thread during tile creation. Note that this will normally result in longer map load times, however. - Objects generated from vector tiles (meshes, game objects, colliders, renderers, etc.) are now pooled and re-used accordingly. This expedites feature creation and helps prevent memory fragmentation.
- Fixed some memory leaks.
- General performance improvements—maps should now load much faster, in general.
- Added convenience methods to
AbstractMapto convert between Lat/Lon ↔ Vector3. This also works for maps that have been translated, rotated, or scaled! #387 - Added tile error exception events that you can hook into to know when specific tiles fail to load. We provide an example
TileErrorHandlerobject that logs these to console. - Added C# wrapper for Mapbox Token API (to validate tokens).
- Added transparency shader for raster tiles—this enables you to convert black to alpha from Mapbox studio styles (to render just road labels, for example).
- Added new
LoftModifier—use this to make complex geometry from line features. - Added prefabs for location provider and “player” avatar for convenience. #382
- Added Mapbox Map Matching API #302
- It should now be safe to nest the Mapbox folder (SDK) in your own projects.
- You can now properly change/load scenes at runtime. #381
- Fixed token validation issues (validate token when initializing
MapboxAccess). #430 - Custom inspectors now properly serialize assets assigned via built-in object browser.
- Fix for certain tile providers not updating properly when re-initializing a map.
- Fixed issue where clipped features would result in several new features. #398
- Fixed one potential race condition with
DeviceLocationProvideron iOS devices, where location would not properly send locations as expected. Conversions.csare now properly supported in zoomable map implementations.- Fixed bug where certain tile providers would give out of sync exception.
- Fixed
duplicate keysexception related to some slippy maps. - Fixed bugs related to snap modifiers not working properly depending on
feature positionof the stack. - Removed duplicate event registration in
MapVisualizer. - Fixed bugs associated with
Filtersand string comparisons inVectorLayerVisualizer.
- Made several methods virtual to better support extension.
- Improvements to map editor. #343
- Map editor will refresh automatically when window receives focus.
- VectorTileFactory now has checkboxes to toggle specific layer visualizers.
- Use
InitializeMapWithLocationProviderto initialize a map at a specific location (device location), but don’t forget to disableInitializeOnStarton your map object! - LocationProvider has been abstracted for easier serialization/assignment in the Unity editor.
- LocationProvider now supports sending additional data with
Locationobject. - It is now easier to mock locations in the editor.
- Array support to mock a specific route (
LocationArrayEditorLocationProvider). - Transform support on
EditorLocationProviderto create simple offsets. - Use Unity Remote app to send location updates directly to the Unity editor from your device!
- Array support to mock a specific route (
DynamicZoomexample has been improved, see newZoomablemap example.- Added string to lat/lon conversion method.
- Various nodes in the map factory framework now have public fields to support run-time styling or modification before map generation (based on settings, for example).
- Maps now support float values for zoom level—you can use this to inform camera controllers, for example.
- Added UnityTile getter to AbstractMapVisualizer. This enables
UnityTilelookup at runtime. #382
- Optimized and consolidated examples.
- Removed
Driveexample. - Removed
DynamicZoomexample (replaced withZoomableMap). - Removed
LowPoly. - Removed
MapReload(many examples now support this functionality). - Removed
SlippyTerrainexample (seeZoomableMapfor similar and improved functionality). - Removed
TerracedWorld. - Added
Explorerexample—vector map example covering a variety of layers and features. - Added
ZoomableMapexample. - Combined MeshGeneration Examples into BasicVectorMap folder.
- Removed
- See here for the latest.
ZoomableMapdoes not constrain map position to camera bounds. At some zoom levels, the map will go above the camera.- iOS/Unity 2017.1+ sometimes location updates are delayed or not sent properly. We suspect this is an iOS/Unity issue.
- If you have issues with missing libraries in Xcode, please check that you are not using
symlinkin your Unity build settings and that your min. target OS is 8. - Requesting too many tiles at once (on client) will often lead to many failed tile requests. We recommend that you distribute these requests over many frames!
09/26/2017
Please note: this release marks the beginning of official support for the Unity 2017 lifecycle.
- As always, please remove older versions before installing!
AbstractMaphas officially been abstracted! This means that you must substitute, in your own scenes, a concrete implementation. We offerBasicMap,MapAtSpecificLocationandDynamicZoomMap.- MapVisualizer has also been abstracted for tile placement purposes. You may need to point your existing maps to the new concrete implementation (
MapVisualizer) and re-serialize your references (Factories).
- General performance optimizations.
DynamicZoomMap,DynamicMapVisualizerandDynamicZoomTileProviderdemonstrate how to build web-like maps that can pan and zoom smoothly.- You can now convert latitude/longitude to a position on the sphere (see
Conversions.csand theGlobeexample). - Use the new
MapAtSpecificLocationcomponent to create a map that is centered precisely at a given location. - Use the new
RangeAroundTransformTileProvidercomponent to procedurally load tiles as a transform changes. This is useful for loading map content as a player avatar moves based on physical location. Check theLocationProviderexample for more information. - Map Editor (Mapbox --> Map Editor)
- Allows navigation of any Map Factory Frameworks referenced in the current scene
- Selecting a node will select the corresponding asset for manipulation in the inspector
- Added new asset browsing capabilities to these nodes (factories, modifiers, etc.)
- We now catch exceptions when parsing Android library file names (duplicate library check).
- Fixed some wrong
Conversionsvalues and methods that would lead to improper positioning or gaps between tiles. - The Mapbox configuration window no longer gets stuck validating a token.
- Wolfulus line ending fixer issues in Unity 2017 have been resolved.
- Fixed broken
VectorTileExample. AbstractMapVisualizerstate change events no longer fire improperly when loading tiles from cache.- Tiles should no longer appear all white or all black when using very small
UnityTileSize. Map.csno longer executes the notify callback twice.
- Maps can now be
Initializedwith a latitude/longitude and a zoom level, at any time!- This means that you can re-use a map for a new location or zoom.
- Scaling is now performed at a vertex level, which helps prevent floating-point imprecision and leads to a cleaner hierarchy.
Vector2dis now serializable (for inspector purposes).MapIdandFactoriesare now public so that you can change them at runtime.
08/01/2017
Please note: our next release will end support for the Unity 5.x lifecycle. We look forward to taking advantage of Unity 2017 optimizations and features.
- As always, please remove older versions before installing!
TypeFilternow uses an array. You will need to update your filters!MeshFactoryis obsolete. Please replace withVectorTileFactoryorStyleOptimizedVectorTileFactory.PoiVisualizeris obsolete. Please use a standardVectorLayerVisualizerwith aPrefabModifier.- Triangle.NET has been replaced with
Earcut. If you were using Triangle features, you will need to import that library yourself. - If you were using a
RangeTileProvider, you will need to update its parameters, which are now described in terms of North, East, South, and West (for readability). ChamferModifierhas been replaced withChamferHeightModifier. This new version looks and performs better.- Ensure your
MapImageFactorieshave the expectedMap Id! We've updated the way Ids are serialized, and your old Ids may have been lost--sorry!
- Added support for style-optimized vector tiles! Read more here.
- You will need to use the new
StyleOptimizedVectorTileFactory. - This can result in far less data transfer/data processing.
- You will need to use the new
- Replaced Triangle.NET with
Earcutwhich results if much faster geometry construction. - Removed expensive string concatenation process in
FeatureBehaviour. MeshFactoryno longer waits forTerrainorRasterresults before making its own web request.
- Added ability to cache successful tile requests to disk (via SQL database). If a tile is found in the database, it will not make a web request.
- Note that tiles in this database only expire when the cache fills up!
- Want to create a low-poly landscape? Use the new
LowPolyTerrainFactory! - Maps can now be snapped to
y=0(this prevents the need to reposition your camera at higher elevations). - Added ability to choose pivot of objects generated with the
ModifierStack(tile center, first vertex, or vertex average). - Use the new
GameObjectModifierAddMonoBehavioursModifierto "generically" addComponentsto your game objects. - Added ability to snap to terrain/other objects with
SnapTerrainRaycastModifier. This is more accurate (but slower) thanSnapTerrainModifier. - Added "example"
SpawnInsideModifierwhich can be used to add procedural decoration inside a mesh (for example,Landuse). - Added
ChamferHeightModifierwhich, obviously, combinesChamferandHeightmodifiers. - Added
GlobeTileProviderto request the entire world at once (be advised that this may result in MANY tile requests!). - Project your tiles on a sphere! Use the new
GlobeTerrainFactoryto make a globe. - Added ability to pick a custom style from the Mapbox Styles API.
- Use the search button and enter your user name (for Mapbox Studio).
- Note that this requires you to create an API token that supports
styles:list!
- WebGL builds now work as expected!
- Fixed Unity Cloud Build and iOS signing issues that were related to native iOS libraries.
- Map tiles are now parented correctly to the map root (on device). If you previously had trouble rotating/moving/scaling a map on device, fret no longer!
- Fixed some bad height calculations for buildings.
PolygonModifiernow correctly generates holes and better handles multipleparts.- Tiles should now wrap at world boundaries correctly (rather than producing invalid tile requests).
- Unity/C# warnings have been addressed.
- Added preprocess build step and a unit test that checks for duplicate Android libraries.
- Example
CameraMovementscript has been improved to allow for mouse wheel translational zoom and precise touch drag (for panning). - Added option to remove sidewalls from height-extruded geometry (for roads, for example).
- Use
VertexDebuggerto debug vertices for procedurally generated meshes. - Added timeout exception to
HttpRequest. - RangeTileProvider is now more readable.
- See
Globeexample for one method of spherically projecting tiles. MeshGenerationBasicshas new interactive elements to demonstrate some of the new features we've added.StylingDemoMeshGenerationusesSpawnInsideModifierto add "bushes" tolanduse:park.- Check
TerracedWorldto see an example of how to use contour data to generate Godus-like worlds.
05/26/2017
- Added support for runtime texture compression (DXT) in the
MapImageFactory MapVisualizernow pools gameobjects/textures/data to avoid instantiation and destruction costs- TerrainFactory now allocates less memory when manipulating geometry
- Elevation textures are no longer held in memory and height data parsing and access is much faster
- Added new
FlatTerrainFactorythat is optimized specifically for flat maps - Tiles can now be cached in memory—configure the cache size in
MapboxAccess.cs(default size is 500) - Slippy maps now dispose tiles that determined to be "out of range"
- Tiles that are out of range before completion are properly cancelled
- Terrain generation in Unity 5.5+ should be much faster and allocate less memory
-
Added new retina-resolution raster tiles
-
Added mipmap, compression, and retina-resolution support to
MapImageFactory -
The
PoiGenerationexample now includes clickable 3D world-space gameobjects—use these as reference for placing objects in Unity space according to a latitude/longitude -
MapVisualizerandTileFactoriesnow invoke state change events—use these to know when a map or specific factory is completed (loaded)- See an example of implementing a loading screen in
Drive.unity
- See an example of implementing a loading screen in
-
You can now specify GameObject
Layerfor tiles in theTerrainFactory -
Add colliders to your terrain by checking the
Add Colliderflag in theTerrainFactory -
Add colliders or specify GameObject
Layerfor buildings, roads, etc. withColliderModifierandLayerModifier
- Building snapped to terrain are now rendered correctly (check
Flat Topsin theHeightModifier) - Web request exceptions are now properly forwarded to the
Response(should fixUnknown tile tag: 15) - Complex building geometry should now be rendered correctly (holes, floating parts, etc.)
- Materials assigned to a
TerrainFactoryare now properly applied at runtime - Because of
UnityTilepooling, you should no longer encounterkey already exists in dictionaryexceptions related to tile factories—this means you can change map attributes (location, zoom, terrain, etc.) at runtime without throwing exceptions
- Map configuration values are no longer static, and an
OnInitializedevent is invoked when theAbstractMapreference values have been computed (prevents temporal coupling) - Snapping to terrain has been simplified—just add a
SnapToTerrainModifierto yourModifierStack Slippy.cshas been refactored toCameraBoundsTileProvider.csand the backing abstraction enables you to write your own tile provider system (zoomable, path-based, region, etc.)MapController.cshas been refactored toAbstractMap—this is not yet abstract, but should provide an example of how to construct a map using aMapVisualizerand aTileProviderUnityTilehas been refactored to support reuse and has the ability to cancel its backing web requestsDirectionsFactoryno longer relies on aMapVisualizerorDirectionsHelper, but can still use existingMeshModifiers
05/01/2017
- Terrain height works as intended again (fixed out of range exception)
- Fixed issue where visualizers for
MeshFactorieswere not being serialized properly - Fixed null reference exception when creating a new
MeshFactory
04/26/2017
- Added support for UWP
- Share your Hololens creations with us!
- Fixed precision issue with tile conversions
- Replaced
GeocoordinatewithVector2d
- Replaced
- Mapbox API Token is now stored in MapboxAccess.txt
MapboxConveniencehas been removed
- Added
LocationProvidersand example scene to build maps or place objects based on a latitude/longitude - Mesh Generation:
- General performance improvements (local tile geometry)
- Custom editors for map factories
- Added new
MergedModifierStackwhich will reduce the number of transforms and draw calls in dense maps - Continuous UVs for building facades
DirectionsFactorynow draws full geometry, not just waypoints- Fixed occasional vertex mismatch in
PolygonMeshModifier.cs(which caused an index out of range exception)
- Updates mapbox-sdk-unity-core to v1.0.0-alpha13; features vector tile overzooming
- Updates to attribution guidelines in README.MD
- Added Conversions.cs and VectorExtensions.cs to enable simple conversions from geocoordinate to unity coordinate space
- Added new infrastructure for mesh generation
- Added new demos for basic, styled, point of interest vector mesh generation
- Added new demo for vector tiles + terrain with a slippy implementation (dynamic tile loading)
- Added a new demo for Mapbox Directions & Traffic
- Deprecated old slippy demo
- Deprecated old directions component demo
- Added core sdk support for mapbox styles
- vector tile decoding optimizations for speed and lazy decoding
- Added attribution prefab
- new Directions example
- All examples scripts updated streamlined to use MapboxConvenience object
- removed orphaned references from link.xml, this was causing build errors
- moved JSON utility to Mapbox namespace to avoid conflicts with pre-exisiting frameworks

