diff --git a/sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs b/sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs index 78a037279..8f218d804 100644 --- a/sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs +++ b/sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs @@ -33,7 +33,7 @@ internal override TileResource MakeTileResource(string tilesetId) return TileResource.MakeRawPngRaster(Id, tilesetId); } - public RawPngRasterTile(CanonicalTileId tileId, string tilesetId) : base(tileId, tilesetId, true) + public RawPngRasterTile(CanonicalTileId tileId, string tilesetId, bool useReadonlyTexture = false) : base(tileId, tilesetId, useReadonlyTexture) { } } diff --git a/sdkproject/Assets/Mapbox/Unity/CustomLayer/MapboxTerrainFactoryManager.cs b/sdkproject/Assets/Mapbox/Unity/CustomLayer/MapboxTerrainFactoryManager.cs index d28b610f6..a9d54534a 100644 --- a/sdkproject/Assets/Mapbox/Unity/CustomLayer/MapboxTerrainFactoryManager.cs +++ b/sdkproject/Assets/Mapbox/Unity/CustomLayer/MapboxTerrainFactoryManager.cs @@ -66,7 +66,14 @@ protected override RasterTile CreateTile(CanonicalTileId tileId, string tilesetI // } // else { - rasterTile = new RawPngRasterTile(tileId, tilesetId); + if (SystemInfo.supportsAsyncGPUReadback) + { + rasterTile = new RawPngRasterTile(tileId, tilesetId, true); + } + else + { + rasterTile = new RawPngRasterTile(tileId, tilesetId, false); + } } #if UNITY_EDITOR