Unity 4: Can't build game randomly?

So now I’ve been getting some weird error. This is around the 300th test start lol.

Here is the error:

mainData is corrupt! Remove it and launch again! (Position out of bounds 16284 > 16280)

I get this after starting up a build of the game. The only problem I’ve noticed is that the Pause Menu doesn’t work now… but I don’t understand why…

Any idea, anyone? This is really annoying lol

Do you have in your project two scripts (js, cs or boo) called the same but written in two different languages? I had this case and for me it was having FogOfWar.cs and FogOfWar.js files.

You, sir, are a godsend.

Thanks for the info, this really helped. :slight_smile:

Wow genial THANK YOU sir!!! Had the same problem… would you mind me asking how you found the solution??

Thanks a lot!

Godsend++.

For those of you trying to find duplicate scripts with the same name, in the project view, click the icon with the shapes (search by type) and select Scripts. All your scripts will be in the window in alphabetical order, just look for dupe C# and js ones.

i have the same problem in Unity 4…

Unity should make a warning for that or ignore one of the files at build time.