Closed Alexees closed 4 years ago
Thanks for reporting this.
I've just checked and for some reason I don't see these warnings in the log when I build the player (2018.4.17f1). I don't really need a reproduction to fix this though - I'll remove those #if
blocks for the next version of Dissonance.
Does not happen when building, does happen when then running
Sorry for the long delay with this issue! Dissonance 7.0.1 has finally been released which removes the #if UNITY_EDITOR
blocks around serialized state.
Context
I just updated Dissonance For Mirror Networking to 6.4.5 and realized that there are a couple of #if UNITY_EDITOR added to SerializedFields. Please don't do that. When compiled, the script layout will be different from the serialized data (unless you managed to serialize after recompilation) and will cause of lot of these when running the build: "A script behaviour has a different serialization layout..."
Expected Behavior
No layout difference spam in build
Actual Behavior
spam
Workaround
I usually just keep the serialized fields and wrap them in #pragma warning disable 414. I think the only other way is to save that data elsewhere, per instance.
Fix
Have no idea
Steps to Reproduce
build and watch the console
Your Environment
Dissonance version used: v6.4.5
Unity version: 2018.4.15f1
Editor Operating System and version: Microsoft Windows 10 Pro 10.0.18363 (x64)