Overview
Color Replacer scans open scenes, the current selection, project prefabs and materials, grouping all discovered Color values by similarity (tolerance). Replace entire groups at once or tweak items individually. Supports UI components, renderers, lights, cameras, particle systems (Color mode), and shader color properties.
Install
Folder & Menu
- Open via Tools → Color Replacer.
- Hotkey: Ctrl/Cmd + Shift + Y.
Requirements
- Unity 2019.1+ uses
Shader.GetProperty*API. - Older Unity auto‑fallbacks to
ShaderUtil.*. - TextMeshPro recommended for TMP color fields (optional).
Quickstart
UI Guide
Toolbar
- Scan / Refresh — run a new scan.
- Dry Run — simulate replacements without writing.
- Compact — denser items list.
- Report — show save‑dialog after apply to export CSV.
- Search bar — filter by hex, context name, property, or asset name.
Scope & Matching
- Scopes: Open Scenes, Selection Only, Project Prefabs, Project Materials.
- Include Inactive — include disabled objects.
- Tolerance — widen/narrow color grouping.
- Match Alpha — include alpha in grouping.
- Name Filter — partial match on object/material names.
Renderer Handling
- Instance material (
renderer.material) — affects instances, marks scene dirty. - Shared material (
renderer.sharedMaterial) — modifies the material asset.
Groups & Items
- Left: color groups with counts, select/deselect quickly.
- Right: per‑item details — context, property, path, inline color editor.
- Palette: store and reuse your brand colors.
Supported Types
| Category | Components / Notes |
|---|---|
| UI | Image, RawImage, Text, TextMeshProUGUI |
| 2D/FX | SpriteRenderer, LineRenderer (start/end), TrailRenderer (start/end) |
| Lighting | Light.color |
| Camera | Camera.backgroundColor |
| Particles | ParticleSystem.Main.startColor (Color mode only) |
| Renderers | Material & Shared Material color properties |
| Other | Fallback reflection for Color fields/properties |
Shader Materials
Materials are scanned using modern shader property API when available:
shader.GetPropertyCount();
shader.GetPropertyType(index) == ShaderPropertyType.Color;
var name = shader.GetPropertyName(index);
mat.GetColor(name) / mat.SetColor(name, value);
ShaderUtil.* so older projects remain supported.Safety, Undo & Saving
Undo‑Safe
All changes are recorded in a single Undo group: one step to revert.
Auto Save (Optional)
Enable Auto Save Scenes / Auto Save Assets to persist results immediately.
Dry‑Run
Preview replacements without writing, then apply with confidence.
Performance Tips
- Limit scope (e.g., Selection Only) when iterating quickly.
- Use Known Types First to skip reflection and speed up scans.
- Filter by Name to reduce search set.
- Prefer Instance material while testing replacements.
FAQ
Particles didn’t change?
Only Color mode of Main.startColor is supported. Gradients are intentionally not modified.
URP/HDRP support?
Yes. Any shader exposing Color properties via the property API is scanned.
Can I revert?
Absolutely. Press Ctrl/Cmd + Z. All operations are grouped under one Undo entry.
Does it change shared assets?
Only if you enable Shared material. Otherwise, instance materials are affected.
Changelog
- 2.0.0 — Migrated to
Shader.GetProperty*API with legacy fallback; UI polish and documentation update. - 1.0.0 — Initial Pro release: scopes, tolerance grouping, palette, Dry‑Run, CSV, Undo, auto‑save, shader color support.
Support
Questions or issues? Reach out:
- Email: help@aisencorporation.com
- Docs (online): aisencorporation.com/assets/color_replacer/
- Discord: community server