Search Issue Tracker

Fixed in 2017.1.0f3

Votes

0

Found in

2017.1.0b1

Issue ID

902037

Regression

Yes

Project sometimes fail to build due to different serialization order in Editor and Player

Serialization

-

Reproduction steps:
1. Open project attached (PartialClassBuild.zip).
2. Build it on standalone player.

Expected result: It will be built successfully.
Actual result: Building stops, output from console: (NOT ALWAYS!)
Error: "Type '[Assembly-CSharp]Player' has an extra field 'FieldTwo' of type 'System.Int32' in the player and thus can't be serialized (expected 'FieldOne' of type 'System.Int32')"
Error: Type '[Assembly-CSharp]Player' has an extra field 'FieldThree' of type 'System.Int32' in the player and thus can't be serialized (expected 'FieldOne' of type 'System.Int32')
Error: "Fields serialized in Editor, class 'Player'
'FieldOne' of type 'System.Int32'
'FieldTwo' of type 'System.Int32'
'FieldThree' of type 'System.Int32'"
Error: "Fields serialized in target platform, class 'Player'
'FieldTwo' of type 'System.Int32'
'FieldThree' of type 'System.Int32'
'FieldOne' of type 'System.Int32"
Error: "Error building player because script class layout is incompatible between the editor and the player."

Note: This does not appear all the time. If it is not reproducible from first time, just makes some changes (add space) in Player.cs.

Reproduced on: 2017.1.0a3, 2017.1.0b1.
Works fine on: 5.6.0p1.
Regression introduced in 2017.

Comments (21)

  1. ChLRajesh

    Dec 14, 2017 15:43

    This issue again happens in Unity 2017.3.0f2 beta for UWP

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.