Unity 3.4.1 With BIG issue in MonoDevelop!!!

There is a biiiiiiiiiiiig issue with MonoDevelop in Unity 3.4.1.
It has namespace errors related to the UnityEditor assembly reference.

How to reproduce?
Steps:

  1. Update to 3.4.1
  2. Create new empty project
  3. Import Standard Assets Mobile
  4. Open one of the scripts with MonoDevelop and hit F8 to compile

“Namespace UnityEditor not found,” …and so on.

Anyone has any idea if this can be fixed without waiting for another Unity patch fix?

SOLVED!!!

Guys! Solved the problem! I didn’t manage to actually understand why this happens but a possible fix is this:

If you have UnityScript files in your project and get the UnityEditor namespace reference not found issue, go to the “Solution” panel (at the left of the MonoDevelop IDE) and open the “Assembly-UnityScript → References” branch.
Delete all the references in there EXCEPT the one to the “UnityEngine.dll”. Then press F8 again to build from MonoDevelop.
You should be good to go.

But clearly there’s still a bug somewhere causing this error. I’m just glad I found an easy way around it.

BTW, everytime I reopen MonoDevelop I see those references added again. So I have to delete them again. But when working on a project you rarely close MonoDevelop.

Hope this helps someone.

Thanks !
You should report the bug and the solution you found, I’m sure it has better chances of getting fixed for next release !
Cheers,
/Thomas

If you use C#*a temporal and simple workaround is not to use the normal solution but the -csharp solution that has no UnityScript as the issue is related to unityscript projects and references only it seems

Floky’s solution didn’t work for me. I just downloaded the new Unity and tried to build the Angry Bots demo through MonoDevelop. I got the same problem. Any other work around yet?

It seems that the reason that Unity can get away with this is that their big customers all use Microsoft Visual Studio, which do not seem to have this problem (according to developers I have talked to), so this could be a workaround. I have both C++ C# visual studio installed, but decided not to use them in my pipeline, but if Unity does not fix the errors, we might have to :wink:
Cheers !
/Thomas

They are fixing it:

I’ve dowloaded both 3.4.2 and 3.5 and have the same issue. I don’t mind taking the time to learn to C# and monodevelop eventually but I need to make some things happen now. All the tuts were w/ uniscite and js. There are .js files in the standard assets that work fine but if I were to write the exact same code into a new one I get an error. What gives?

Are they errors or warnings?

The problem was “fixed” with 3.4.2 - all the errors disappeared so compilation doesn’t stop, but the namespace warnings are still there for all the Unity .js scripts. I just ignore them. I use c# but haven’t seen errors with the odd .js script I have entered.

There seems to be similar problem with 4.1

oh, and how do I actually delete the reference? righ-clicking gives onely ‘display options’ menu, and hitting ‘del’ only gives me a beep and no delete.

Put your script in Assets/Editor folder If you are using unity 4.0.

Related


If reference deletion from the Assembly unityproj files annoys you, you may try this tool:

https://bitbucket.org/mviranyi/unity-patches/downloads/UnityBCE0021_20130623.zip