Search Unity

Problems converting in Metro

Discussion in 'Editor & General Support' started by PlayMagicLtd, Nov 28, 2013.

  1. PlayMagicLtd

    PlayMagicLtd

    Joined:
    Aug 23, 2012
    Posts:
    48
    Hello,
    we have a unity project working fine both in PC standalone and Android builds, now we ported it to Metro Store build and when changing scene from the menu to the game the app exit with this message in the VisualStudio output window:
    A first chance exception of type 'System.AggregateException' occurred in mscorlib.dll

    and this message in the UnityPlayer.log file:
    The file 'C:/Users/Public/Documents/Unity Projects/Volley/Export_VS_MetroStore/Volleyball Extreme Edition/bin/x86/Debug/AppX/Data/level3' is corrupted! Remove it and launch unity again!
    [Position out of bounds! 809580 > 809576]

    there are no errors when building, only 30 warnings all similar to the following one

    Assets\Scripts\Audio\RandomSound.cs(5,9): warning CS0436: the type 'System.SerializableAttribute' in 'c:\Users\Natale\AppData\Local\Temp\Predefines.cs' conflict with the imported type 'System.SerializableAttribute' in 'c:\Users\Public\Documents\Unity Projects\Volley\Library\ScriptAssemblies\Assembly-CSharp-firstpass.dll'.

    we tried to fix the problem surrounding any [System.Serializable] in the code with an #if !NETFX_CORE
    this removed the warnings but was disastrous for the app, now it crash at the very start with this message in the UnityPLayer.log:
    A script behaviour has a different serialization layout when loading. (Read 2336 bytes but expected 11492 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    so, what is the right way to fix the problem? how we can have the classes members editable in the unity editor working also in the metro buid?

    as a side note, we already successfully ported to Metro a different app, without having these problems so we are pretty sure we have something wrong in this project, but we are totally unable to understand what.

    Thanks in advance for any help