I installed Unity on this new machine yesterday and I’ve discovered that the Autocomplete functionality in the Unity install of MonoDevelop is completely hosed. All it will autocomplete for me are static variables in the class that I’m currently authoring… but instance variables, instance methods, everything else refuses to autocomplete.
I downloaded the “real” MonoDevelop to compare against, and it autocompletes perfectly… but unfortunately when I hook up Unity to use it, every time I try to open a new file by clicking it in the Unity editor the computer wants to close my currently open instance of MonoDevelop so that it can open up an identical instance… which means I have to save all my files before I open any new ones via Unity.
Autocomplete is really important! How can I solve this issue?
The heart of my question is this : Why doesn’t autocomplete / intellisense work in Unity’s MonoDevelop on Mac? How can I make the autocomplete work correctly?
The “normal” MonoDevelop (ver 2.4.2) has autocomplete / intellisense that works, so why doesn’t Unity’s? What’s different? How can I fix it?
Yes, I set MonoDevelop to be the default code editor (first the Unity install, then the “real” version of MonoDevelop, then back to the Unity install).
Yes, both the Unity version and the “real” version will open the entire solution in MonoDevelop, not just the single class file.
Please file a bug using the Unity bug reporter (Help → Report a Bug), and attach a MonoDevelop log ( /Users/maskedMan/Library/Logs/MonoDevelop/MonoDevelop.log ) from a MD session with the completion problem.
Unfortunately I can’t find a MonoDevelop.log file on my system. I did however fill out as detailed a report as I could, as well as steps taken attempting to solve the issue.
It seems like there’s something awry in the .pidb files, as replacing the ones in the Unity MonoDevelop with the ones in the “normal” monodevelop give me the UnityEngine autocomplete options, but completely fail to give me the normal C# options such as those for List<> (In fact nothing under System or its subpackages appears).
I have finally found a workaround for this solution.
Copy and paste all the pidb files from the “official” MonoDevelop into the Unity MonoDevelop’s CodeCompletionData folder
copy from ~/.config/MonoDevelop/CodeCompletionData
to ~/.config/MonoDevelop-Unity/CodeCompletionData
This gives you all the Unity-specific autocompletion but none of the System definitions work.
Find a friend or co-worker who has a working version of Unity’s MonoDevelop and beg/borrow/plead for their .pidb files from their own MonoDevelop-Unity/CodeCompletionData folder. Replace the ones on your machine with theirs.
I tried that already. The directory that’s auto-generated by my MD-Unity is faulty. If I delete that folder (or even the entire MonoDevelop-Unity folder) and let MonoDevelop-Unity autogenerate another one I get the same non-functioning autocomplete as before.
So, I worked around this problem for a while by copying the CodeCopmletionData from a coworker who had a correctly functioning install, but now that I’ve updated Unity the problem has returned, at least regarding the “System” package for vanilla C#. Further, at least one other coworker of mine has run into this problem. His monodevelop completely lacked any autocompletion until using the codecompletiondata folder from the other computer.
This is getting really frustrating. Where should these system libs live?