/PaletteSwapping-Unity5

Palette Swapping Script for Unity 5

Primary LanguageC#MIT LicenseMIT

PaletteSwapping

  1. Import your sprite with following settings:

• Texture Type: Advanced

• Read/Write Enabled: Yes

• Wrap Mode: Clamp

• Filter Mode: Point

• Override for PC, Mac / Linux Standalone: Yes

• Format: ARGB 32bit (To enforce truetype)

  1. Rightclick on your imported sprite → Create → Color Palette

  2. Edit the Palette

  1. Create your gameobject out of your sprite. To use the texture changer, use a gameObject with a meshRenderer. The texture changer will change the mainTexture property (On Unity's standard shader this is the albedo).

  2. Add the Palette Changer Script (PaletteSwapping/Scrips/PaletteChager.cs) to your gameobject

  3. Add your Color Palette Asset as an Element of the Palettes array

  1. Have fun !