- Home /
Corrupted files during runtime
Hi,
When I do a PC, Mac and Linux Standalone build I'm getting the following error messages:
The file 'C:/dev/unity/project/project_Data/mainData' is corrupted! Remove it and launch unity again!
[Position out of bounds]
A script behaviour has a different serialization layout when loading. (Read 40 bytes but expected 44 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
So I exited Unity, deleted all runtime generated stuff and tried again. For every first build, it works fine. For every build after the first one I get the same error (without any code changes).
I did a serious investigation and it seems that this happens if I have a script that exposes a public field of a class/enum defined in and external .dll (marked as Serializable, of course).
I'm using Unity 5.0.1f1 on Windows 7 64 bit. But this also happened with the previous version (>5). I checked for multiple Unity installations and I just have the one.
Any ideas how to fix this issue? Thanks.
Your answer
Follow this Question
Related Questions
Corrupt Download 0 Answers
Android build data is corrupted 0 Answers
IL2CPP Android - behaviour could not be instantiated! problem 1 Answer
Character Motor Script Corrupted 1 Answer
Console Error while in editior 4 Answers