[Tutorial] Using Sublime Text 3 in Unity with IntelliSense Autocomplete
So personally I was looking for a step by step to do this but only found pieces here and there. So hopefully this will help someone out. This was done on OSX but Sublime is cross platform so I am sure it will work on any platform.
Why Sublime Text? Multiple cursors. Once you start using it you can't live without it.
Requirements
http://www.sublimetext.com/3
https://packagecontrol.io/installation
Step1
Install Mono http://www.mono-project.com/download
Step2
Install OmniSharpServer https://github.com/OmniSharp/omnisharp-server
OSX/Linux
git clone https://github.com/nosami/OmniSharpServer.git
cd OmniSharpServer
git submodule update --init --recursive
xbuild
Step3
Install Kulture package from Sublime Package Control
Install OmniSharp package from Sublime Package Control
Step4
Add
{
"auto_complete": true,
"auto_complete_selector": "source - comment",
"auto_complete_triggers": [ {"selector": "source.cs", "characters": ".<"} ],
}
to Preferences > Settings - More > Syntax Specific - User
https://github.com/OmniSharp/omnisharp-sublime#c-language-specific-settings
Step5
Open the root of your Unity project in Sublime. There should be a .sln file there.
Save your Sublime project there. Project > Save Project As
Add
{
"folders":
[
{
"follow_symlinks": true,
"path": "."
}
],
"solution_file": "./ProjectName.sln"
}
to the sublime-project file you just created. ProjectName is the .sln file in your root directory which will be you project's name of course. Note there is also a -csharp.sln file. It is not that one.
Step6
In Unity set Preferences > External Tools > External Script Editor to Sublime Text
DONE
If every was setup correctly you should now get autocompletion and IntelliSense in Sublime. If not let me know :)
Why Sublime Text? Multiple cursors. Once you start using it you can't live without it.
Requirements
http://www.sublimetext.com/3
https://packagecontrol.io/installation
Step1
Install Mono http://www.mono-project.com/download
Step2
Install OmniSharpServer https://github.com/OmniSharp/omnisharp-server
OSX/Linux
git clone https://github.com/nosami/OmniSharpServer.git
cd OmniSharpServer
git submodule update --init --recursive
xbuild
Step3
Install Kulture package from Sublime Package Control
Install OmniSharp package from Sublime Package Control
Step4
Add
{
"auto_complete": true,
"auto_complete_selector": "source - comment",
"auto_complete_triggers": [ {"selector": "source.cs", "characters": ".<"} ],
}
to Preferences > Settings - More > Syntax Specific - User
https://github.com/OmniSharp/omnisharp-sublime#c-language-specific-settings
Step5
Open the root of your Unity project in Sublime. There should be a .sln file there.
Save your Sublime project there. Project > Save Project As
Add
{
"folders":
[
{
"follow_symlinks": true,
"path": "."
}
],
"solution_file": "./ProjectName.sln"
}
to the sublime-project file you just created. ProjectName is the .sln file in your root directory which will be you project's name of course. Note there is also a -csharp.sln file. It is not that one.
Step6
In Unity set Preferences > External Tools > External Script Editor to Sublime Text
DONE
If every was setup correctly you should now get autocompletion and IntelliSense in Sublime. If not let me know :)
Comments
OnCollisionEnter2D, Update, Start, FixedUpdate and so on. What should I do to have this kind of autocompletion?
Thank again!
I've used your info, this tutorial, and the Omnisharp Git, but some reason I can't get Intellisense to show up. (I'm on OSX)
I've tried a number of different solutions. Installing different versions of Monodevelop, installing all the stuff in different order, reinstalling, double and triple checking all the settings, but I can't figure out what the problem might be. I get some sort of autocomplete, but it doesn't look like Intellisense to me.
Any idea what might be going on? Or at the very least, a way to troubleshoot this issue would be nice....
Thanks!