Serialization error when building game in windows phone 8

Hi guys, I have an error when build my game on windows phone 8. My scene runs fine on PC, but when I build and run it on my WP8 device, it show this error:

" A script behaviour has a different serialization layout when loading.
(Read 24 bytes but expected 252 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your script?"

I doubt that the error occur after I created some classes with tag [System.Serializable] in order to bring the List of those classes to Unity inspector. But, I am not sure because when I delete those classes the error still happen.
There is #if Unity_editor clause in PoolManager of PathologicalGames I purchased in asset store. However, when I create a test scene using Pool Manager, there is no error. So may be it not caused by PoolManger
So may be the error is not caused by these posibilities.

My Unity version is 4.5.4f1

I still stuck right here!, please help!

Hi,

does this happen only in a particular scene, or any scene (even an empty one)?

Thanks for your response
Finally, after a week of pain, I found the source of this error. It is cause by one of effect prefabs containing the script CFX_InspectorHelpEditor. This script is from Cartoon FX pack that I bought in asset store. In this script there is a clause: “#if UNITY_EDITOR … #end if”. The error happen when my skill prefab has a Transform variable linking to the effect prefab.
So, I remove the script CFX_InspectorHelpEditor from the effect prefab and the error disappears from the WP8 screen :slight_smile: