Why does game work in editor and not build?

Hey,

I am having issues getting a our game to run properly in build. It works fine in the editor, and the culprit seems to be something to do with the resources.assets file.

We are loading gameobjects from asset bundles, which may have something to do with it. Also, the project was inherited from a group that built it in Unity 3.5.6. We are using Unity 4.0.1. We did save out the asset bundles from Unity 4. Also, like I stated already, it runs in the editor without a problem.

Here is information from the output log that states the resources.assets file is having issues:

Unloading 2 Unused Serialized files (Serialized files now loaded: 64 / Dirty serialized files: 0)
Unloading 1 unused Assets to reduce memory usage. Loaded Objects now: 3748. Operation took 5.422713 ms.
The file ‘C:/Users/Table1-Projection/Documents/DTOriginalTest/DTTest_Data/resources.assets’ is corrupted! Remove it and launch unity again!
[Position out of bounds! 11850228 > 11850224]

(Filename: C:/BuildAgent/work/812c4f5049264fad/Runtime/Serialize/CacheWrap.cpp Line: 269)
The file ‘C:/Users/Table1-Projection/Documents/DTOriginalTest/DTTest_Data/resources.assets’ is corrupted! Remove it and launch unity again!
[Position out of bounds! 11854196 > 11854192]

(Filename: C:/BuildAgent/work/812c4f5049264fad/Runtime/Serialize/CacheWrap.cpp Line: 269)
The file ‘C:/Users/Table1-Projection/Documents/DTOriginalTest/DTTest_Data/resources.assets’ is corrupted! Remove it and launch unity again!
[Position out of bounds! 11853164 > 11853160]

(Filename: C:/BuildAgent/work/812c4f5049264fad/Runtime/Serialize/CacheWrap.cpp Line: 269)
The file ‘C:/Users/Table1-Project/resources.assets’ is corrupted! Remove it and launch unity again!
[Position out of bounds! 11854484 > 11854480]

(Filename: C:/BuildAgent/work/812c4f5049264fad/Runtime/Serialize/CacheWrap.cpp Line: 269)
The file ‘C:/Users/Table1-Projection/Documents/DTOriginalTest/DTTest_Data/resources.assets’ is corrupted! Remove it and launch unity again!
[Position out of bounds! 11853076 > 11853072]

Any help would be much appreciated.

Thanks.

The issue is caused by a file being named the same in different languages, E.G a file called game.js and a file called game.cs conflict and make the game not work any more, rename one of them and it should fix it!

You will probably need to rebuild your asset bundles with a new version number and tell the game to check for the new version.