- Home /
Exported PNG font texture with SaveFontTexture.js is all white
Hi. I'm having problems exporting a PNG with this script. http://www.unifycommunity.com/wiki/index.php?title=SaveFontTexture When I export the texture everything is white. Already changed the Character parameter (and played a lot with the rest of parameters) but no luck. I've checked the GetPixels result and it seems that every pixel is white, so the issue is probably either in that function or in the casting Selection.activeObject as Texture2D.
I've tryed with 2 different fonts and had the same result. Example: http://www.1001freefonts.com/font/ChopinScript.zip
Anybody been here already ?
Answer by Eric5h5 · Jun 17, 2011 at 10:03 PM
It works fine; make sure you apply any changes to the font after you make them (the Character parameter can't be dynamic, since there is no actual font texture in that case; it's made dynamically at run-time). If you're looking at the preview in Unity, switch to alpha view instead of rgb view.
Hey Eric. Thanks for the script and taking the time to reply me. I did apply the changes. I dunno what I'm doing wrong.
It is friday and after the 9th coding hour so maybe I just need to take a fresh look at this next week. I will try with more fonts and further debugging.
Cheers !
I tried the font you linked to and it worked with no issues. Note that the pixels are all white; the difference is that some are transparent and some aren't.
And that's why you shouldn't code friday night.
Thanks Eric.
Depends on what you were doing earlier that evening, I guess. ;)