[unity script] photoshop pallette importer script
Hey guys,
I cobbled together a script that decodes photoshop colour swatch palettes and imports them as an asset into unity (.ACO files, not .ASE) and I thought I'd post it up here for anyone if they might find it useful. I've only really set it up to handle palette colours saved as RGB and HSV (but that should cover most uses cases anyway). Only tested on unity 4.6, but presumably it'd work on older versions.
To use it, import the scripts, then any .ACO files dropped into unity will be converted into a pallette asset.
Code is a bit messy because there was a lot of fudging figuring out how the format worked. Attached are the scripts + test pallettes.
mac users: you *might* need to change the order of the bits that get read in. If it fails miserably, you can try modify the ByteToWord function by swapping around the 1 and the 0.
I cobbled together a script that decodes photoshop colour swatch palettes and imports them as an asset into unity (.ACO files, not .ASE) and I thought I'd post it up here for anyone if they might find it useful. I've only really set it up to handle palette colours saved as RGB and HSV (but that should cover most uses cases anyway). Only tested on unity 4.6, but presumably it'd work on older versions.
To use it, import the scripts, then any .ACO files dropped into unity will be converted into a pallette asset.
Code is a bit messy because there was a lot of fudging figuring out how the format worked. Attached are the scripts + test pallettes.
mac users: you *might* need to change the order of the bits that get read in. If it fails miserably, you can try modify the ByteToWord function by swapping around the 1 and the 0.
zip

zip

colour_pallette.zip
6K