Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MonoDevelopment doesn't recognize Unity's structs

Discussion in 'General Discussion' started by AndrAla, Mar 17, 2017.

  1. AndrAla

    AndrAla

    Joined:
    Mar 11, 2017
    Posts:
    18
    Ever since I downloaded version 5.5.2 - the monodevelopment doesn't recognize Unity's libraries, and it's structs.

    You can see how everything is red...
    Can anyone tell me how can I fix that, or do I need to write my scripts blindly? I'm new to C#, and Unity, and this is kind a demotivating :p
     
  2. Kona

    Kona

    Joined:
    Oct 13, 2010
    Posts:
    208
    I had this problem a while ago aswell, if you open the unity editor and go to Edit>Preferences and select the "External Tools" tab you should see a field saying "External scrip editor" with "Monodevelop (built-in)" selected.
    Change it by pressing "browse" from it's drop-down menu and manually select monodevelop (located in your unity install directory.)

    I don't know what could be the cause of the problem but as said, it worked for me so let's hope it work for you too! :)
     
  3. AndrAla

    AndrAla

    Joined:
    Mar 11, 2017
    Posts:
    18
    I did what you said, but it didn't help. I even tried to move the Monodevelop folder inside the Unity folder, but still the same :(

    EDIT: okay, I incidentally found out what was wrong. I right clicked on "Assembly-CSharp" (on the left of the screen), went to options > general, and changed the "Mono / .NET 3.5" to "Mono / .NET 4.5" and it started working :) (the 3.5 was not found)
     
    Last edited: Mar 18, 2017
    Kona likes this.