Hello,
When I upgraded from Android Unity pro 4.3 to 4.5 I have a few sprites that are not recognized as sprites anymore. If I try and make any changes to these sprites I get the following error.
!hasError
UnityEditor.DockArea:OnGUI()
The same project in Unity 4.3 works fine.
Here are some stats for one of the sprites.
Texture type = Sprite(2D \uGUI)
Sprite Mode = Single
Max Size = 256
Format = 16bits
Image size = 102x256 (NPOT)
Only for some of these problem sprites if I change the max size from 256 to 128 or 512 it will then recognize it as a sprite. For the other sprites it makes no difference. I did search for this problem but I could not fine any solution. Has anyone else had this problem?
What I have already done:
- Deleted and reimported problem sprites.
- Tried changing the Max size (only fix a few of them, but then the sprite size is not correct for the game)
- Change format from compressed to 16 bits, this had no effect on any of these sprites
I am not sure what else to do here? I would appreciate any suggestions or other things to try.
Thanks!
Wanted to bump this thread. I still cannot find out why this is happening. Any thoughts?
I wanted to add some more information to this.
The original image I am importing into unity 4.5 is 288x726. When I import this image it will import fine as a sprite. When I change the max size to 256 (drops the image to 102x256) I get the !hasError UnityEditor.DockArea:OnGUI() error. Then it is not recognized as a 2D sprite.
So then I change the size of the image outside of unity to 288x732. Do the same process as above and it imports fine. Now when I change the max size to 256 there is no problem. Seems like Unity is barfing on some image size ratio? This is not making any sense to me. Unity 4.3 this problem does not exist.
Am I missing something, or is this a bug? I can’t be the only one seeing this :o(
Thanks
I wanted to post a workaround that seems to work incase anyone else comes across this problem. I still do not understand why I had this problem to begin with, but after playing with this for some time it appears to be linked to the sprites width/height ratio.
I imported my problem sprites into gimp and increased the canvas size along the width (10 to 15 pixels). This will not scale the image at all. Reimported the modified sprites into unity without any errors. Fun times!
Cheers!
1 Like