Help Needed: Player Sprite Not Visible on Mapbox 2D Map in Unity

Hi everyone,

I’m working on a 2D mobile game in Unity that uses Mapbox to display a real-world map. I’m trying to add a PlayerMarker sprite to the map, but it’s not showing up even though I’ve followed the usual setup steps.

Current Setup:

  1. Mapbox is working fine and the map renders correctly in the scene.
  2. I added a PlayerMarker GameObject with a Sprite Renderer (custom sprite).
  3. The Main Camera is set to:
  • Position: (0, 10, 0)
  • Rotation: (90, 0, 0) (top-down view)
  • Projection: Orthographic
  1. In the GPSManager script, I’m setting the PlayerMarker’s position using:
    Vector3 position = map.GeoToWorldPosition(new Vector2d(latitude, longitude), true);
    playerMarker.transform.position = position;

What I’ve Tried

  • Verified the Culling Mask includes the “Default” layer.
  • Adjusted the Z-position of the PlayerMarker to ensure it’s on the same plane as the map.
  • Changed the Sorting Layer to “Default” and set Order in Layer to 10.
  • Temporarily forced a hardcoded position for the PlayerMarker (e.g., (0, 0.5, 0)), but it still doesn’t render.
  • The map works fine with Mapbox’s default “Player” prefab, but replacing it with my custom sprite causes the issue.

Issue:

The PlayerMarker remains invisible, even when the position and camera setup appear correct. The Mapbox map itself renders fine.

Any ideas on what could be causing this? Could it be a layer, shader, or rendering issue that I’m missing? I’d really appreciate any suggestions or debugging tips.

Thank you in advance for your help!

Review what is different between those two things. Layer? Shaders? It will be something.

Otherwise, just standard troubleshooting:

Run the game, press pause, start digging through the scene.

Find out where the thing you expect to see is. Is it there?

If it’s there, is it in front of a camera? Is something misconfigured?

Make a new scene, get a single thing working in mapbox. If you can’t go to mapbox docs and troubleshoot.