GitHub - AlexeyPerov/Unity-Materials-Hunter: Provides summary of all materials and renderers in Unity project (original) (raw)

Materials Hunter Unity3D Tool unity

stability-stable License: MIT Maintenance

MaterialsHunter is a tool for Unity that scans project assets for:

All code combined into one script for easier portability. So you can just copy-paste MaterialsHunter.cs to your project in any Editor folder.

plot

Quick start

Use "Tools/Materials Hunter" to open the window.

Recommended workflow:


Analyzed Issues Description

Renderer warnings

Null material

Null material slot

unity_builtin material at <TransformFullName>


Material warnings

Unable to load

Texture is null at <PropertyName>

unity_builtin texture at <PropertyName>

Shader is null

Shader is missing (InternalErrorShader)

Built-in shader

Render queue override: <Queue> (shader default: <DefaultQueue>)

Duplicate of N material(s): <Names...>

Not referenced by any renderer, not in Resources, not Addressable


Material variant: parent is missing or invalid

Variant chain depth D exceeds threshold T

Heavy variant overrides: C (threshold T)

GPU instancing is disabled but shader supports it

Shader "<ShaderName>" is not SRP Batcher compatible


Batch Operations

Batch operations run on renderer targets selected by:

All operations support:

Safety notes:

1) Replace material (Apply: Replace source -> target)

2) Replace unity_builtin materials (Apply: Replace unity_builtin)

3) Remove null material slots (Apply: Remove null slots)

4) Fix missing shaders (Apply: Fix missing shaders)


Output and export

The results have separate Materials and Renderers views. Both views support path filtering, warning filters, sorting, and pagination for large projects.

Use Export Materials CSV to write the currently filtered material rows. Use Export Renderers CSV to write the currently filtered renderer rows. Exports are useful for review outside Unity or for comparing results after cleanup.

Limitations and interpretation notes


Additional Defines


Installation

  1. Using Unity's Package Manager.
  1. You can also just copy and paste file MaterialsHunter.cs inside Editor folder

Contributions

Feel free to report bugs, request new features or to contribute to this project!


Other tools

Unity Scanner

Dependencies Hunter

Addressables Inspector

Missing References Hunter

Textures Hunter

Asset Inspector

Editor Coroutines