Individual Sprite in Sprite Sheet being cut in half.
I am fairly new to Unity and wanted to try sprite animations.
I created a Sprite Sheet in GIMP and exported it as an .png file. The sheet is laid out to contain six 64x64 sprites in a row. Each sprite being given a 1 pixel border to prevent issues with slicing the sprites; Hence, the Sheet keeps each sprite in a 66x66 square.
When I imported it into Unity, I set the sprite mode as 'Multiple', pixels per unit first as 64, then later 32 to check if it fixed (it did not), and set compression to none as this results in strange compression artefacts that are unnecessary as it is a pixel animation.
I set all the slices for the sprites be be exactly 64x64 pixels, all at the appropriate positions and the 4th sprite is being cut in half. I jumped on these forums to try and find solutions to the problem and came across a few people with similar situations but none of what worked for them worked for me.
Some solutions I found and tried (none of which worked) were:
Turning on 'Generate Mip Maps' and trying combinations of the setting for that.
Adjusting the 'Pixels Per Unit' value (as mentioned above).
Moving the Main Camera from z position -10 to -1 (and other random values).
Moving the z position of the sprite around (both positive and negative).
Here is an image as reference, showing the inspector for the Sprite Sheet and the Sprite Editor of the slice that was done:
I haven't a clue as to what is wrong and strangely, even though I edited the Sprite Sheet a few times to try moving the sprites around, it is always the 4th sprite, without fail.
If anyone knows what might be wrong, I would appreciate any help at all.
Quick update, I have fixed this problem but I don't understand WHY it is fixed.
All I did was move all the sprites up by 1 pixel so that none of them were touching the bottom edge of their 64x64 sprite area. This fixed it for some reason.
It makes no sense to me as the left, right and top of the sprites are still touching the edges and that causes no problems so I would appreciate if anyone has an explanation for what is going on.
Your answer
Follow this Question
Related Questions
Depending on the mouse movement (or position), the player sprite 0 Answers
Animator prevents OnMouseDown() 0 Answers
Sprites moving (shaking) during animation while they should not 1 Answer
Animation Styles: Pre-created sprites or rigging individual sprites? 1 Answer
Why are my character's bone's not showing anymore? 0 Answers