Monodevelop can auto-complete code, but it can't auto-complete key functions like Start
, Update
, FixedUpdate
, OnCollisionEnter
and so on, as such I often misspell the key functions.
Is there a way to add auto-complete or spell-check entries for these common functions?
Check that Visual Studio is set as your external script editor in Unity using Edit / Preferences / External Tools . Depending on your Unity version: Check that the Visual Studio plugin is installed in Unity. Help / About should display a message like Microsoft Visual Studio Tools for Unity is enabled at the bottom.
While you can't create autocorrect entries in MonoDevelop, you can create Code Snippets (called Code Templates in MonoDevelop).
A code snippet is a chunk of code that is automatically created when you type an id string (e.g. start) and hit tab. It could be a function, a property, a bit of boilerplate you always find yourself writing (e.g. GetComponent calls). It even shows up in the autocorrect list.
Code snippets are quite powerful, and even allow you to tab over boilerplate and change important things like types and variable names easily and quickly.
Simply create a code snippet (MonoDevelop-> Tools -> Options -> Text Editor -> Code Templates-> Add) for each of the items you typically have problems with.
Well, you can use the Unity Snippets for MonoDevelop for your problem. It has got a lot of useful snippets in it, works really great. When the Code Snippet Code appears, Double Tap TAB key to insert the template.
Download the Unity.template.xml and create a folder called Snippets inside the C:\Users{your_pc_name_here}\AppData\Roaming\MonoDevelop-Unity-5.0 (or in Windows Press Win+R -> %appdata%) and Copy this file to that folder. On Restarting Monodevelop, the code snippets will be working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With