UPDATE Oct 28 2011
So, I have updated Unity to the newest minor version and this problem has returned. The CodeCompletionData folder listed below, while correctly referencing all the UnityEngine and UnityEditor classes for intellisense / autocomplete, I am once again missing all the basic "System" files from native C#.
private List<Foo> someFoo; // List will not autocomplete and no data is available
Sys // <- Unity MonoDevelop autocompletes this as "SystemInfo" or "SystemLanguage" but just plain "System" is not available.
And again, if I delete all my old MonoDevelop-Unity preferences (and indeed, reinstall Unity from scratch) and allow them to autopopulate I lose all my intellisense including the UnityEngine and UnityEditor classes.
I suppose I could yet again grab the latest files from my coleague if he's already successfully updated his Unity install, but that's no way to solve this issue and is not sustainable.
Has anyone encountered any problems with the autocomplete feature of the MonoDevelop install that comes with Unity 3.3 on Mac 10.6.7? For reference, it's a version of MonoDevelop 2.4.2.
The autocomplete / intellisense won't actually show any code hints at all except for local variables/methods and static variables/methods that are in the current Class's definition.
By comparison, the "real" version of MonoDevelop has perfectly working autocomplete, but it's not usable by Unity in any real way, so I'm stuck with the broken Unity version.
How can I solve this problem? Working intellisense is very important to me.
After trying kdubb's solution below, I've found that:
MonoDevelop will incorrectly re-generate the pidb files if they don't exist.
MonoDevelop will incorrectly re-generate the entire MonoDevelop-Unity folder if it doesn't exist.
Replacing the MonoDevelop-Unity .pidb files with the ones found in MonoDevelop will give me all the Unity-specific class definitions, but it will NOT give me any definitions from System or its subpackages.
Replacing the entire MonoDevelop-Unity directory with the MonoDevelop directory breaks Unity's MonoDevelop. It fails to open.
Answer by Bartwillemsen
Apr 28, 2016 at 09:41 AM
I had the same problem but I was able to fix it quiet easily.
First, right click on the "Assembly-CShap" folder in MonoDevelop and select options. Than, in the "Build - General" tab, make sure that target framework is set to a version you have actually installed. For me, it defaulted to a very old version of Mono, which obviously didn't work!
thank you for this easy solve :)
Answer by kdubb
May 25, 2011 at 03:29 AM
Shutdown MonoDevelop and delete all of the ".pidb" files in every folder of every project in your affected solution(s). Then delete all the ".pidb" files in the CodeCompletionCache (1). This should get things working again.
(1) CodeCompletionCache location: Mac it is at "~/.config/MonoDevelop-Unity/CodeCompletionData", Windows it is at "AppData\MonoDevelop-Unity\CodeCompletionData".
This did not work.
However this did make me think of something else to try that partially worked. I copied all of the CodeCompletionData from the "normal" MonoDevelop install and replaced the Unity CodeCompletionData with it. This gave me all the UnityEngine (and other Unity-related) autocomplete prompts, but I am still missing all the "normal" C# prompts (eg: it doesn't know about System, System.Collections, List<>, etc). I'm going to try grabbing some definitions from other people to see if they have a set that works for me.
After grabbing definitions from a co-worker and pasting those into ~/.config/MonoDevelop-Unity/CodeCompletionData I now appear to have autocomplete for both Unity and C# script at last! +1 for leading me down the right path even if the answer appears to be "it's a bug in the Unity monodevelop"
Thanks for the +1. Although it seems weird that you cannot get your MD-U to build those symbols automagically. Here's another idea... have you recently changed the location of your Unity install? I believe that the solution have hardcoded references to the .Net and Unity assemblies and maybe your MD is pointing to the wrong place now?
No, both Unity and MD-U are in their default locations. Additionally, I did not choose an alternative location during the install process.
Answer by haim96
Dec 10, 2013 at 07:10 AM
you missing "using UnityEngine;" at the beginning of the script.
Answer by defsine
Nov 13, 2013 at 02:56 AM
Im having the the same problem also
Answer by LuisGuimaraes
Dec 10, 2013 at 07:03 AM
Move MonoDevelop.app one folder up so it's in the same folder as Unity.app. At least on unity 4.3.1 that's it.
This worked like a charm, but it's better not to copy the whole MonoDevelop.app folder. I've just made a link:
Open up Terminal
ln -sf MonoDevelop.localized/MonoDevelop.app/ MonoDevelop.app
That will create a symbolic link to the MonoDevelop.app folder :-D
It works for me. Also the @dfreniche suggestion is very good - I'm using that approach. It fixes all problem about solution and symbols. I am on a MAC Mini i5 - 16 GB - OSX 10.9.2 - Unity 4.3.4f1.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
15 People are following this question.
Multiple Cars not working
Distribute terrain in zones
open C# scripts on Linux in native monodevelop
No autocompletion in Monodevelop
Unity3d and monodevelop c# scripting on ubuntu 16.04 IntelliSense problems