Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: athos on November 30, 2012, 05:51:08 PM
-
I get the following on startup:
A script behaviour has a different serialization layout when loading. (Read 24 bytes but expected 32 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
I believe I've tracked it down to UIPanel.cs:
#if UNITY_EDITOR
// Screen size, saved for gizmos, since Screen.width and Screen.height returns the Scene view's dimensions in OnDrawGizmos.
Vector2 mScreenSize = Vector2.one;
#endif
Is the #if necessary or can a NonSerialized attribute be added?
-
That doesn't make sense. The mScreenSize shouldn't be serialized from what I can see.
-
Private fields don't get serialized, yeah. What version of NGUI / Unity?
-
Nicki, you're quite right. I just confirmed the issue was in fact coming from a different project file. Thanks for pointing that out.
-
Nicki, you're quite right. I just confirmed the issue was in fact coming from a different project file. Thanks for pointing that out.
Hi Sorry, I have no intention of highjacking NGUI fourm but this I now have this problem and can not find the solution. @athos What did you track this issue down to?
-
You need to start a new thread and better explain your issue, Anxo. This thread is from 2012.