I’m working on some 2D HUD graphics. I’ve created them all in the same graphics application (Xara Photo and Graphics Designer 2013) and have exported each to an independent True Color w/Alpha PNG file.
However, some of the files are giving me trouble on import into Unity. Upon import of a problematic file, I get two errors in the Editor console window:
I got no problems importing your image. I’ve the same version as you!
I just Drag and Drop into unity’s folder. No erro at all. Did you change anythink in the file?
Thanks for taking a look. No, I haven’t changed anything in the file. Though, I did once open it in another graphics app and re-save it as a new PNG - thinking that maybe Xara had a bug in it’s PNG export format. However, that didn’t help either. And, yes, I’ve tried to import the problematic files multiple times…
One likely difference between your setup and mine is that I’m running Unity in OpenGL mode as I can’t get it to run in DirectX mode since upgrading to 4.3.x.
If you compare the (correct) image of the sprite in the lower-right with the (incorrect) image shown in the Scene view, you’ll see the Scene shows roughly the bottom 2/3 of the sprite and then (apparently) stretches it to fit the original sprite dimensions.
This sprite was also problematic to import. The actual image is 1304 x 676. If I change the Sprite import “Max Size” setting to 2048 (as I should), the sprite fails to import (same errors are reported above). If I set it to 1024, it does import but gives the results you see in the screenshot. Other smaller import dimensions also do the same basic thing (512, 256, etc).
Is there some fundamental thing I don’t understand about importing sprites into the new 2D system, or is it just buggy?
I wouldn’t ever use the Compressed setting anyways, it is way too aggressive of a compression and really destroys the image, even if it’s just a solid color, it will make it some other off-color.
I’ve experienced the same error message while trying to import a large sprite-sheet. I eventually resolved it by changing my sprite sheet from a single row of sprites (eg. 44 x 1) to a grid of sprites (eg. 11 x 4). For whatever reason Unity was immediately happy with the second style. YMMV… posting just in case it saves someone else any time!