Line 20: | Line 20: | ||
[[File:Autocomplete3.jpeg]] | [[File:Autocomplete3.jpeg]] | ||
− | We will now add basic Lua code completion to our VS Code, select the extensions icon on the left hand panel and search for | + | We will now add basic Lua code completion to our VS Code, select the extensions icon on the left hand panel and search for LuaCoderAssist then click install, this plugin will add Lua code completion. |
+ | |||
+ | [[File:Autocomplete4.jpeg]] | ||
+ | |||
+ | Our VS Code setup is now complete and we are ready to move onto the next step. | ||
+ | |||
+ | == Setting up Editor in Unity== | ||
+ | |||
+ | From inside our Unity project we need to point at our editor of choice, select the edit drop down menu and click on preferences. In the window displayed click on External Tools and click on the external script editor drop down and browse for your VS Code .exe file. |
The Sinespace Editor pack includes the tools required to create a scripting auto complete file for use with editors such as Microsoft VS Code & Atom. Below is a demonstration of how to set up with VS Code.
From inside your Unity project select the Sinespace drop down menu and select tools/scripting/generate auto complete file for Atom.
Locate the root folder for your Unity project in my example documents/2017 then click save (you do not need to enter a file name here)
A new file will be added to your project folder called .luaautocompleterc, This file contains the Sinespace Scripting API information. We are now ready to setup our editor of choice.
You can obtain Microsoft VS Code from here : https://code.visualstudio.com/
After install we need to point VS Code at our Unity project folder, select the file drop down menu and select add folder to workspace. Locate your Unity project folder in my example documents/2017. On completion a new panel will be added to the left hand side containing our unity project.
We will now add basic Lua code completion to our VS Code, select the extensions icon on the left hand panel and search for LuaCoderAssist then click install, this plugin will add Lua code completion.
Our VS Code setup is now complete and we are ready to move onto the next step.
From inside our Unity project we need to point at our editor of choice, select the edit drop down menu and click on preferences. In the window displayed click on External Tools and click on the external script editor drop down and browse for your VS Code .exe file.