Search Issue Tracker

Fixed in 5.0.X

Votes

0

Found in

5.0.0b3

Issue ID

632337

Regression

No

Serialized data can not be loaded on deployed Windows Phone 8.1 C# Project

WP8.1

-

Steps to reproduce:
1. Download attached project or make a project which has serialized data in it. For example, a custom script with a public string field. Change that field in the inspector to some value.
2. Build and run that project with Unity C# Projects checkbox ticked in build settings. Errors will be thrown. For example:

InvalidCastException: Unable to cast object of type 'DrawText' to type 'UnityEngine.IUnitySerializable'.
at UnityEngine.Internal.Types.$UnityType639.$Invoke0(Int64 instance, Int64* args)

at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: TODO Line: 0)

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

(Filename: C:/buildslave/unity/build/Runtime/Serialize/SerializedFile.cpp Line: 1578)

Add comment

Log in to post comment