Map tiles not load
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:
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.


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 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?
@atripathi-mb of course!
Also, I'm using the Lightweight RP v5.7.2
These are my map settings:

@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.
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 🙏