wiki.sine.space | sinespace

Auto Complete Setup (Scripting)

From wiki.sine.space
Jump to: navigation, search

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.

File export

From inside your Unity project select the Sinespace drop down menu and select tools/scripting/generate auto complete file for Atom.

Autocomplete1.jpeg

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)

Autocomplete2.jpeg

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.

Microsoft VS Code setup

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.

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 LuaCoderAssist then click install, this plugin will add Lua code completion.

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.

Autocomplete5.jpeg

Our auto complete installation is now complete, after creating an object with a scripting runtime component clicking the open in external editor button will now open our editor of choice with Lua and Sinespace code completion.

Enjoy Scripting in Sinespace.