Textures messed up in Windows Build

I ran into a problem today that I have never seen before. My game looks fine when playing in the Unity Editor, but the textures are messed up when I play in a standalone Windows build. Both of these screenshots are from the same computer. It is a Windows 10 computer with a GTX 780 card. I have never seen this happen before. Is there something obvious I need to check in my project? Thanks.

Screenshot from Unity Editor:

Screenshot from Windows build:

I tried reimporting the assets that had messed up textures. That did not help.

Next, I tried reimporting all of the assets in my project. It took a couple hours. Unfortunately, it did not help. I am still seeing exactly the same problem. All of the textures look fine when playing my game in the Unity Editor, but the textures are messed up in the Windows build.

I also read through the Editor.log file after I did a Windows build of my project. It does not report anything missing in the log file during the build.

Does anybody have any suggestions for other things to check?

Next thing I am going to try is upgrading Unity from 5.4.2p1 to 5.4.2p4.

Updating to Unity 5.4.2p4 did not help either.

I still have not found a solution to this problem. I am not even sure what to call the problem when searching for solutions. What would you call the problem? It just looks like Unity is generating random colored dots instead of using the materials. Is there a graphics term to call that problem? Thanks.

Iā€™m having the excact same issue, in editor its working fine, but on build some textures go like that.

Iā€™m using 5.4.4, deferred, linear, hd, on mine its affecting the rocks, UI, some tree billboards, and some weapons, and scopes

@ShilohGames Have you tried deleting the ā€˜Libraryā€™ folder, from the root. I was gonna do it but didnā€™t wanna spent an hour waiting for it to recompile and end up the exact same. Itā€™s weird its just suddenly happened too.

I am using deferred, gamma, and HDR.

I have not tried deleting the Library folder yet, but it is probably one of my next things to try.

Here is another image from today where the Windows build has messed up textures on certain models in the scene. The ship in the foreground has a bunch of random noise in its texture, but that same ship looks great when I play my game in the Unity Editor.

I have tried a number of things. I tried the ā€œGenerate Lightmap UVsā€ option on models. I tried clearing and rebaking lightmaps. I have tried reimporting everything.

One thing that helped a little bit was deleting some of the disabled objects I had in my scene. Once I cleaned out the scene as much as possible, the 3D model for the first person cockpit started displaying properly again.

Honestly, at this point, I am suspecting that this problem is simply a bug in Unity, but I donā€™t know how I managed to suddenly run into it.

I am really hoping that somebody from Unity will tell me what the problem is called and how to fix it.

Iā€™ve deleted the Library folder gonna see if makes a difference, also I read that it could be related to having a large amount of textures in a build or resources. I do have a lot of textures which most I donā€™t use, so Iā€™m also gonna remove them before I try a new build.

Iā€™ll post later my results JIm

Hi, deleting the Library folder didnā€™t help, just took 5 hours to recompile. So donā€™t do that, but what worked was to get the textures in the build under 4gb, before I had just over 4gb, now iā€™ve been through all textures removed a load and lowered the res on some, and itā€™s under 3gb. I done a test and all is perfect.

I use a asset called ā€˜Build Report Toolā€™ I would recommend it, it will tell you exactly what you are using.

Hope this helps Jim

2 Likes

I think you might be on to something regarding textures in the build. I installed ā€œBuild Report Toolā€ asset in my project, rebuilt my project, and then viewed the build report tool. In my build, I currently have about 5GB of textures. If there is a 4GB hard limit in Unity during a build, then that would explain why certain textures seem broken in the build.

I see obvious ways I can reduce the total amount of textures in my project. I would like to hear from somebody at Unity about whether or not there is a 4GB texture limit in builds. If there is a 4GB limit, I would like to know why.

1 Like

I trimmed my texture usage until I got it down to 3.9GB, so I am under the assumed 4GB texture limit now. Now all of the textures are fine/normal in my Windows build. While this is fantastic, this is a frustrating limit. I was planning to add a couple GB of additional textures to my game before launch.

1 Like

Here is another thread about this bug in Unity:

1 Like

Also, I created a new thread specifically about the 4GB limitation bug:

Here is an existing bug report about this problem:

1 Like

Thanks I have same issues I have voted!.. We ALL shouldā€¦