A Unity Editor extension that streamlines material assignment to Prefabs and efficiently creates color variation Prefab Variants.
With a thumbnail-equipped material browser and scene preview, setting up materials on models is also made easy. It can be used in any situation where you need color variant Prefabs — from VRChat avatar outfits to accessories, world assets, and more.
Have you been duplicating Prefabs for each color and saving them as Original Prefabs without really thinking about it?
With the full-duplication approach, every time the base is modified you must manually apply the same changes to all color variants. And when deploying outfits to multiple avatars, you need to recreate color variant Prefabs from scratch for each avatar, causing your workload to balloon.
This tool solves these problems by automatically generating Prefab Variants that only store material differences.
Changes to the base Prefab are automatically propagated to all Variants, making color variant maintenance significantly easier.
Both tools are accessible from the menu bar: Tools > Color Variant Prefab Generator.
1. First, build out color variants on one avatar (CV Creator)
Starting from a base Prefab (e.g., Shinano_HonmeiKnit),
create Prefab Variants for each color: Black, Blue, Brown, etc.
Finalize the material setup while checking the scene preview.
2. Bulk-deploy the completed color variants to another avatar (Batch Generator)
Specify a base Prefab with MA, PB, and other setup already completed for the new avatar (e.g., Airi_HonmeiKnit),
add the color variant Prefabs from step 1 as sources in bulk.
Material differences are auto-detected and Prefab Variants for all colors are generated at once.
The intended flow is to carefully build out the material configuration on the first avatar, then use it as a template to deploy to other base Prefabs. Of course, using CV Creator alone to create color variants is also perfectly useful.
Create color variants one at a time with care, using the material browser and scene preview.
It is also convenient for the task of assigning materials to models.
Tip: Drag a Hierarchy instance into the Base Prefab field (not an asset from the Project window). Scene preview requires an instance in the scene.
Nested Prefab roots are accepted: The root of a Nested Prefab placed inside a parent Prefab instance can also be set as the Base Prefab. In that case, the generated Variant is saved as a Variant of that Nested Prefab itself. Regular GameObjects inside a Prefab instance that are not Nested Prefab roots cannot be selected.
Variant Parent: When the base Prefab is a nested Variant (e.g., Base → Black), a Variant Parent dropdown appears in Output Settings. You can choose which ancestor to use as the parent for the generated Variant. This is useful for creating sibling Variants (e.g., making “Red” a direct child of “Base” instead of “Black”). In Standard mode, this is locked to the direct parent.
Import from Prefab: You can also load material configurations from an existing Prefab via the options menu (▼) on the Base Prefab field. Material differences are automatically detected and populated into the override slots.
Folder Assignment: You can also assign Output Path and Material Folder by dragging and dropping a folder from the Project window.
CV Creator has two generation modes, toggled via the options menu (▼) on the Base Prefab field. The default is Standard.
| Mode | What’s saved |
|---|---|
| Standard (default) | Material overrides plus GameObject-level changes on the Hierarchy instance (added/removed GameObjects and property overrides on existing GameObjects: name, active state, tag, layer, static flags, etc.). An Include Transform/component changes option in Output Settings switches to a path that saves the Hierarchy instance directly as a Variant so every override Unity recognizes is included (Transform changes, component property changes, components added/removed, etc.) |
| Strict | Material overrides only. Any structural or property changes on the Hierarchy instance are ignored |
In Standard mode, Renderers under newly added GameObjects appear as a dedicated section at the end of the slot list so you can assign overrides to slots that don’t exist on the base Prefab.
Tip: Pick a mode based on what you want to save:
- Material changes only — Strict mode. Nothing other than material changes is saved, so future base Prefab edits propagate cleanly to all Variants
- Material changes + GameObject add/remove — Standard mode (default, option OFF). Keeps the saved footprint as small as possible
- Also save Transform / component changes — Standard mode with Include Transform/component changes ON. Saves all changes just like Unity’s built-in “Save as Prefab Variant”
To reset material changes, use the Clear Overrides button. The dropdown (▾) offers three revert modes:
| Mode | Behavior |
|---|---|
| Visual Only | Restores appearance only. Prefab override marks remain |
| Selective Revert | Reverts only overrides added by this tool. Pre-existing overrides are preserved |
| Full Revert | Reverts all overrides on the target Renderers |
Note: Closing the window does not automatically reset material changes made during preview. Use Ctrl+Z (Undo) to revert.
Generate Variants for a different base Prefab in bulk, using existing color variant Prefabs as sources. For example, you can bulk-deploy color variants created for one avatar to another avatar. Both Prefab Variants and regular Prefabs can be used as sources.
Tip: If files with the same name already exist at the output destination, a confirmation dialog will appear asking whether to overwrite all or cancel. You can also assign the Output Path by dragging and dropping a folder.
Both tools support a customizable naming template with the following placeholders:
| Placeholder | Description |
|---|---|
{BaseName} | The base Prefab’s file name (without extension; trailing _Base is automatically removed) |
{VariantName} | The variant name you specify |
Default template: {BaseName}_{VariantName}
Example: Base Airi_HonmeiKnit + Variant Black → Airi_HonmeiKnit_Black.prefab
Tip: In the Batch Generator, if multiple variants share the same name, a
_1,_2,_3… suffix is automatically appended.
Example:Black,Black,Black→Airi_HonmeiKnit_Black_1.prefab,Airi_HonmeiKnit_Black_2.prefab,Airi_HonmeiKnit_Black_3.prefab
When comparing two Prefabs, the tool uses a 5-tier priority system to match material slots. P1-P4 require slotIndex and rendererType to match. P5 prefers the same renderer type but falls back to cross-type matching when no same-type fuzzy match exists:
| Priority | Strategy | Description |
|---|---|---|
| P1 | Exact path | Same hierarchy path, object name, slot index, and renderer type |
| P2 | Same depth | Same hierarchy depth, object name, slot index, and renderer type |
| P3 | Name match | Same object name and slot index at any depth |
| P4 | Case-insensitive | Case-insensitive name match with slot index |
| P5 | Similar name | Names matching after structural normalization (e.g., Body_01 ≈ Body_02) or sharing a common base name (e.g., Ribbon_blue ≈ Ribbon_red), ranked by a composite score |
When multiple candidates exist at the same priority, tiebreakers are applied in order: base material name match, hierarchy path similarity, closest hierarchy depth, then Levenshtein distance on full paths.
What ends up in the generated Prefab Variant depends on the CV Creator mode:
The Batch Generator always produces material-only Variants, regardless of CV Creator mode.
MIT — Copyright (c) 2026 @kxn4t
net.kanameliser.color-variant-generator
Undefined
0.3.0 (Changelog)
2022.3 or later
No dependencies
No dependencies
No legacy packages