I’ve been busy for the last few weeks upgrading my codebase to work with Unity 2018.3. This included removing the now abandoned FullInspector asset and replacing it with the shiny new Odin asset.
Other than a few hitches and gotchas here and there things seemed to be going pretty smoothly so I decided to make a small game as a way to actually test everything. Things worked fine in the editor for the most part. However, the last two days have been a nightmare as I attempted to get the thing to build to a standalone for Windows. And once I finally got the build process working - bam - I’m hit with a mostly empty screen with a wall of errors all saying the same thing more-or-less.
“A scripted object (random script name here) has a different serialization layout when loading. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?”
The answer to that query is yes, yes I did #ifdef some field and properties. It’s a perfectly sensible thing to do that has worked well in the past. Regardless of my feelings towards this message I decided to bite the bullet and remove the offending conditional compilations. To no avail. It appears absolutely every object that exists in the scene is puking this error at me, regardless of the non-existence of conditional compilation!
I thought perhaps Odin was the culprit somehow (despite not using its serialization features) but since it would have been impossible to remove it at this point I made a smaller project with just Odin and a few scripts. No such errors popped up in that case. I’m complete at a loss as to what I can do. I dunno how I can simplify the project while still effectively testing my own code. I don’t even know where to start in order to hunt down what might be the actual issue here.
Anyone else have these issues lately or ever for that matter? Any suggestions or clues that might help?