- Home /
Fetching Palette data from texture upon import
I need to fetch palette from indexed color texture upon import - preferably from within AssetPreprocessor::OnPreprocessTexture, but it could also be done elsewhere.
Basically, I'm looking for a way to access some raw image manipulation routine from within unity. System.Drawing.Graphics are not accessible by default, and unity does not seem to expose libpng bindings. Ideas?
P.S. Trying to guess palette data from RGB colors is not an option.
Answer by neginfinity · Jun 03, 2017 at 11:34 AM
As detailed here: https://forum.unity3d.com/threads/replace-image-palette-upon-import.472534/
I've "solved" the issue by writing a native plugin that loads png texture and palette using assetpath.
if anyone knows a better way to do it, I'm all ears.
Your answer
Follow this Question
Related Questions
How can I import SimpleJSON.cs to Unity? 2 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Issue with mecanim playing an animation using setbool 1 Answer
Built project, now scripts are missing. 2 Answers