Skip to content

jinnx-cb/Used-Shaders-Variants-Collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Used Shaders/Variants Collector (Unity Editor Tool)

This editor utility collects all used shaders/variants in the project into a single ShaderVariantCollection asset.
The collection ensures that required shader variants are precompiled and reduces runtime hitching due to on-demand shader compilation. Can definitely be improved, so feel free to change it to your liking or to fit your project/needs.

Features

  • Collects shader variants from:
    • Materials
    • Prefabs
    • Shader/Graphs
  • Runs automatically before builds.
  • Provides an editor window for manual collection and warmup testing.
Shader Variant Window 2

Usage

  1. Open via menu: Jinnx → Tools → Shader Variant Collector.
Shader Variant
  1. Set output path for the collection asset (default: Assets/AllGameShaders.shadervariants).

  2. Click:

    • Build Collection From Project Assets – creates/updates the collection.
    • Editor Warmup Test – forces a warmup of all variants in Play Mode for hitch-testing.

Build Integration

  • The collection automatically rebuilds before each build via IPreprocessBuildWithReport.

Notes

  • Keep the collection path under Assets/ so it is included in version control.
  • Run Editor Warmup Test to confirm shader variants are available and avoid runtime compilation spikes.

About

No description or website provided.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages