Off to a rocky start…

Having a heck of a time getting Unity’s Texture2D.GetPixels32 function to actually read the correct colors.  I have a 32bit PNG being imported with the settings below.  It reads the pure Red (R: 255 G:0 B:0 A:255) just fine which is the bottom row.  From there, the Green is increase by 25 for each tile going clockwise (bottom left corner being: R: 255 G:25 B:0 A:255, then the left side being R: 255 G:50 B:0 A:255, and so on).  If I use pure colors, it imports fine but I’m going to have to use a bunch of different maps if I do that.  But the off-red colors are being adjusted by the GetPixels32 function I think.  For instance, a pixel with R: 255 G: 25 is being read in as RGBA(255, 116, 0, 255).

This will be a Jam entry due to time constraints IRL so any thoughts would be great.

View post on imgur.com

Comments

WizzardMaker
27. Aug 2016 · 20:09 UTC
its a bit late but save it as bmp, bmp saves all the data while ong is compressed before its imported
WizzardMaker
27. Aug 2016 · 20:09 UTC
png*
27. Aug 2016 · 20:38 UTC
Thanks, tried BMP too. I’ve tried it as a streaming asset as well (both bmp and png) same issue. I’ve decided to go against that idea for now and will revisit it later. Going to go with tried and true Text Character maps. 😉