- Home /
UNITY_EDITOR block produces compile error for Web builds
I started seeing this issue a couple months ago (around the time I upgraded to Unity 5). One particular file in my project began throwing a compile error during platform builds, which was odd since it was from a block of code surrounded with #if UNITY_EDITOR.
At first, it was only happening with my Unity Cloud Build WebPlayer builds. Here's the thread I had with UCB folks about it: http://forum.unity3d.com/threads/if-unity_editor-block-getting-compiled-for-web-in-cloud-build.318151/ Unfortunately, they really didn't have anything useful to contribute, and ultimately only wanted to help me fix the issue for UCB builds.
I'm am also seeing this error in my local Editor when I build the Webplayer platform. The fact that I can't seem to find anyone else having this problem (and that it's only in 1 file) is leading me to believe there is either something corrupt in my project, or something wrong with the preprocessor for web builds.
Has anyone ever seen any behavior like this, or has anyone had any experience with assets or projects getting corrupted? Any possible solutions would be very appreciated.
Your answer
Follow this Question
Related Questions
64bit vs 32bit Architecture Preprocessor 1 Answer
How to exclude code if a certain script is not present in the project. 2 Answers
Is it possible to select a prefab during the build process? 1 Answer
Change "profile in use" in AddressableAssetSettings from script or in cloud build config ??? 1 Answer
smcs.exe consistently crashes. 1 Answer