Quick answer: Match the material's shader to your render pipeline, add the shaders to the Always Included Shaders list or reference them so they are not stripped, and use Edit, Render Pipeline, Upgrade Materials when switching pipelines.

Pink materials almost always appear right after a build or a Unity upgrade, never in the editor — which is the tell. The magenta is Unity's fallback for a shader it could not compile or find. Here is how to diagnose which of the usual causes you hit.

How to fix it

1. Confirm it is a render-pipeline mismatch first

If you installed URP or HDRP, every Built-in Standard material turns pink because those shaders do not exist in the new pipeline. Run Edit, Rendering, Materials, Convert Selected (or Upgrade Project Materials) to remap them to the pipeline's lit shaders.

2. Stop the shader being stripped from the build

Shaders used only at runtime (from code or asset bundles) can be stripped because Unity does not see them referenced in a scene. Add them to Project Settings, Graphics, Always Included Shaders, or reference the material from a scene object.

3. Check the shader actually compiles

Select the material and look at the Inspector — a compile error shows there. Custom shaders that compile in the editor can fail on a target platform; check the build log for shader errors and platform-specific keywords.

4. Verify in a development build with the console

Pink in a build but fine in editor means a build-time problem, not authoring. A development build surfaces shader warnings so you can see exactly which shader Unity dropped.

Catching the ones you can't reproduce

The hardest version of this to fix is the one you can't reproduce — it only happens on a player's hardware, OS, driver, or save state, under conditions that simply aren't present on your machine. A report that says “it crashed” or “it froze” gives you nothing to act on, so the bug survives release after release while quietly costing you players.

Automatic error capture closes that gap. Each failure arrives with its full stack trace, the device and OS, the build number, and a breadcrumb trail of what the player did right before it broke, so even a failure you have never seen becomes a specific, reproducible issue. Fold identical failures into one signature ranked by how many players each hits, and your worklist sorts itself worst-first instead of arriving as a stream of vague complaints.

This is where a tool like Bugnet earns its place. Its SDK captures every Unity error automatically with the full stack trace plus device, OS, memory, build, and game-state context, folds duplicates into one grouped issue with an occurrence count, and ties each to the build it first appeared on — so you fix the problem that hurts the most players first and confirm it is gone when its signature disappears from the next release.

The errors you never hear about are the ones quietly costing you players. Visibility turns them into a worklist.