mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

Map tiles not load

Open Miky91 opened this issue 7 years ago • 4 comments

Note: If this is a bug or support ticket, please provide the following information:

  • Unity version: 2019.1.14f1
    • Scripting Runtime Version: .NET 4.x
    • Scripting Backend: Mono
    • Api Compatibility Level: 25
  • Mapbox SDK version: v2.1.1
  • The platform you're building to: Android
  • A description of what you're trying to do:

I am developing a Location-based game but the map doesn't load the tiles, and always looks like in the photo:

error

The Unity Tile component has the correct tile image in the "raster data" variable but is not assigned to the material "TerrainMaterial". Nevertheless I have debugged the code from "UnityTile.cs" and it is assigned the raster image to the material but when the process finish "loadinggrid" texture continues in the material. Also, the raster data state is loaded.

imagen

imagen

How can I fix this problem?

Thank you a lot!

Miky

  • Steps to recreate the bug if appropriate:
  • Links to your logs are also helpful:

Miky91 avatar Nov 11 '19 11:11 Miky91

@Miky91 Could you provide more details on how to reproduce the issue? The information provided in the ticket is not sufficient to fully understand the issue.

Could you provide screenshots of your map settings?

abhishektrip avatar Nov 14 '19 22:11 abhishektrip

@atripathi-mb of course! Also, I'm using the Lightweight RP v5.7.2 These are my map settings: imagen imagen

Miky91 avatar Nov 15 '19 10:11 Miky91

@Miky91 I believe this is because you're using lightweight render pipeline and its materials. SDK uses line below to set textures; MeshRenderer.sharedMaterial.mainTexture = _rasterData; but I believe mainTexture doesn't work for lightweight render pipeline and it should be changed to something like; MeshRenderer.sharedMaterial.SetTexture("_BaseTexture", _rasterData); I'm not sure about the texture name _BaseTexture but you can check it from material debug view in the inspector context menu.

brnkhy avatar Nov 18 '19 16:11 brnkhy

I believe that should fix the problem so I'll close the ticket for now but please feel free to reopen it if it doesn't help 🙏

brnkhy avatar Nov 18 '19 16:11 brnkhy