I’ve clearly been watching too many TV news programs.
It turns out that just adding the following Javascript to an object in a scene will cause it to throw that "#ifdef Unity_EDITOR…"error.
var what : String = “hi”;
Seriously, that’s all I have to add. Then stuff stops working. Pretty much any Javascript in a scene with C# will cause one or the other to fail. I can’t figure out which one it fails first, though.
I am not even entirely sure I got rid of this error… but I had a few variables being declared under #if DEFINITIONs (not necessarily UNITY_EDITOR), all I did was add [System.NonSerializable] to those fields and I stopped getting this error (but I am getting new errors so… lol)
In my case they were variables such as mobile controllers, so they are not the same name as other variables, they just existed for mobile and didnt exist for desktop. Setting those to nonserializable did the trick for me. But as I said, Im not sure this is the problem ur facing