mapbox / mapbox/mapbox-unity-sdk

"Find" method call in MapboxMapBehaviour causes NullArgumentException in android builds

Open
#1,962 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
784
Forks
231
PR merge metrics
No merged PRs in 30d

Description

Line 113 in MapboxMapBehaviour.cs: var defaultMapboxTerrainMaterial = new Material(Shader.Find(Constants.Map.DefaultTerrainShaderName));

Constants.Map.DefaultTerrainShaderName is "Shader Graphs/ElevatedTerrainShader"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at line 113 of MapboxMapBehaviour.cs and inspect Constants.Map.DefaultTerrainShaderName, which is "Shader Graphs/ElevatedTerrainShader". Reproduce the Android build failure and trace why the Find call leads to NullArgumentException. Done means Android builds no longer hit this exception while handling the default terrain shader.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp, unity
Domain
game-dev, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.