- Home /
What to do when Unity messes up your textures
So, Unity has been having problems working with textures recently. First, there was a single texture that got mangled. But only in the editor. Android and iOS builds with the same textures were OK. I supposed it was had to do with some bad memory and lived with it. Then NGUI started messing up the atlases. Hum. I though the atlas builder was having trouble and started using TexturePacker.
Finally today the last shoe dropped and PackTexture is giving me this kind of nonsense:
As you can imagine the sprites are not supposed to be cut in half like that. It looks as if unity thinks each sprite if larger that it actually is. Ho, and it also doesn't save to the proper size. A 2048 texture packed by PackTexture is 1024x.
I think the problem is with the project itself. Some corrupted cache files maybe? Reimporting All didn't do anything. Or emptying the Temp folder. Or rebooting the computer. Or upgrading to 3.5.6 (I'm using 3.5.5).
Answer by nicloay · May 12, 2015 at 06:47 PM
I've just faced similar problem. To fix this. try to close unity remove all files and folders in YOUR_PROJECT/Library folder and start unity.
It will reimport all of your assets.
USE HIS ANSWER! Thanks! :) I had to reopen the scene(freaked me out when I saw everything was gone)
Answer by Bunny83 · Nov 27, 2012 at 11:57 PM
First of all Unity isn't messing up your textures. NGUI is a third party extension. The TexturePacker is a completely seperate software so it also has nothing to do with Unity. You might use the UV information the wrong way...
We can't help much since we have no idea where it goes wrong. We actually don't even know what the picture you've posted is. Is it a screenshot? Is it your atlas texture? If so how has it been generated?
Answer by adbourdages · Nov 28, 2012 at 12:31 AM
I still don't know what went wrong, but in case someone else has the same problem, here is how I fixed it:
export your project as a package (Assets->Export Package...). Make sure to include everything.
create a new project
import the package
If you look at your scenes, you'll notice some errors with the layers: they will be blank and it crashes if you run it.
Close Unity
Copy the content of the folder "ProjectSettings" from your old project to the new one.
Restart Unity et voila!
Answer by Nomibuilder · Sep 08, 2015 at 03:30 AM
If you are trying to change color of your textures then simply copy your atlas Png image and change it in photoshop and replace it in your project.