MAT003

A material with no shader assigned renders magenta

Warning Performance Report only — manual fix

The material’s shader field is empty or dangling: either it was never assigned, or it referenced a shader asset that has since been deleted or lives in a package that isn’t installed here. Everything using the material renders magenta.

What the scan looks at

Material assets whose shader resolves to null. This check short-circuits the other material rules — if there’s no shader at all, questions about pipelines and instancing are moot.

Why it happens

  • A shader from a store asset or package was removed, but materials created from it stayed behind.
  • The project was opened without a package that provides the shader (a common state on a fresh clone before packages resolve, and a permanent one if the package was dropped deliberately).
  • A .shader file was deleted or renamed while materials still pointed at its GUID.

How to fix it by hand

  1. Work out where the shader was supposed to come from. The material’s .meta/YAML holds the missing shader’s GUID; the asset’s name in the Inspector header is often still readable.
  2. Restore the source — reinstall the package or store asset — if the original shader is what you want.
  3. Or reassign a shader that ships with your current pipeline (Universal Render Pipeline/Lit, Standard, etc.) and set up its textures and properties again. Property values only carry over where names match.

What PerfLint does about it

Report-only, on purpose: which shader belongs on a given material is a project decision, and guessing it would produce silently wrong-looking art rather than an obvious error. The finding names each material so you can triage by how much of the scene each one covers.

The neighbouring cases

Magenta has three causes worth separating, and the fix differs for each:

  • No shader at all — this rule.
  • Wrong pipeline family (Built-in shader in a URP project, or vice versa) — MAT001.
  • Shader present but failing to compile on this Unity version — SHDR004.

Check your own project. The scan is free, runs entirely on your machine, and reports this rule with the exact assets that trip it — nothing is uploaded.

Install the free scanner See a sample report


Last reviewed · All rules