Color Change Assistant

So let's say you made this nifty particle effect.

Looks great, art director loves it.

Problem: Producer says, "Great, now we need the wind, water, light, and dark versions." However, in Unity there is no easy way to edit multiple colors at one time. So you have to go through each Shuriken system, click each color swatch, and change it to the appropriate value each time.

Solution: Color change assistant. This is a plugin that accepts a prefab or scene object, containing one or more children with particle systems attached. It also accepts a start color and a target color. Then, any time it finds a color swatch or a color gradient, it hue-shifts them to match.

How much work does this actually save? Well, the above character has four attacks and a total of 58 particle systems. Not every color and gradient swatch is used, but let's say an average of 4 color instances are used on each particle system. Changing them involved a click to open and 1-3 drags to adjust the color. So let's say:

4 more characters * 58 particle systems x 4 colors x (2 drags + 1 click) = 2784 user interactions!

Your producer: "It's just a simple change!" -_-
Well, now it is.
4 more characters * 1 drag into the tool * (2 drags + 2 clicks to to adjust color, + 1 click to execute) = 20 user interactions to get you to this:

What's interesting about this project? Actually, the way Unity set up the Shuriken system doesn't make this easy. Unlike most Unity objects, despite the fact that you can edit them in the editor, most of the members of a ParticleSystem are private and can't be changed by script. So what this script does is rather hacky: it serializes each ParticleSystem, then adjusts the serialized object by looking for color keys and adjusting them when found, and copies the serialized object back into the original particle system.