Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Unity 3.4.1 With BIG issue in MonoDevelop!!!

Discussion in 'Editor & General Support' started by zalogic, Sep 29, 2011.

  1. zalogic

    zalogic

    Joined:
    Oct 6, 2010
    Posts:
    273
    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?
     
  2. zalogic

    zalogic

    Joined:
    Oct 6, 2010
    Posts:
    273
    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.
     
  3. thpetsen

    thpetsen

    Joined:
    Feb 25, 2010
    Posts:
    21
    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
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    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
     
  5. mikriloulou

    mikriloulou

    Joined:
    Nov 30, 2010
    Posts:
    7
    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?
     
  6. thpetsen

    thpetsen

    Joined:
    Feb 25, 2010
    Posts:
    21
    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 ;-)
    Cheers !
    /Thomas
     
  7. profanicus

    profanicus

    Joined:
    Nov 23, 2009
    Posts:
    295
    They are fixing it:

     
  8. mojojojo

    mojojojo

    Joined:
    Dec 16, 2009
    Posts:
    138
    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?
     
  9. profanicus

    profanicus

    Joined:
    Nov 23, 2009
    Posts:
    295
    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.
     
  10. Turcca

    Turcca

    Joined:
    Jan 9, 2013
    Posts:
    2
    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.
     
  11. Foram

    Foram

    Joined:
    Apr 5, 2013
    Posts:
    12
    Put your script in Assets/Editor folder If you are using unity 4.0.
     
  12. mateiasu

    mateiasu

    Joined:
    Mar 11, 2013
    Posts:
    25
    Last edited: Jun 23, 2013