first-class lua editor Emmylua, Welcome to the face

Official documents


1. install IntelliJ IDEA Community Edition 2018.2.4 x64

Official website address

Download it directly , download  Community edition , The community version , franco

This was originally written java Of , During the installation process, some options can be ignored directly

2. download Lua For Windows

Just download the latest , Then install

3. install emmylua plug-in unit

The installation plug-ins are 2 Methods , I installed it with the plug-in library that I searched directly , Other methods , Refer to official documents

* Open settings panel.

* Select plugins and click Browse repositories

* search  EmmyLua  And click  Install  install

* Restart after installation IDEA
4. set up lua engineering

Create an empty project , In order to set it after entering

Choose your Lua Project root directory

5. read lua file , ignore meta file

So is it settings,xlua What needs to be read txt, It can be set by yourself , It doesn't need to be set

  Here's a list of ignored files , There is no picture , It says *.meta; that will do

6. White interface, too hot eyes , Adjust to black


7. The font is too small


8. add to unity Of api Tips

File---Project Structure

spot plus Button

find unity Of  UnityEngine.dll this

I used it unity 2018 Position in  D:\Unity2018\Editor\Data\Managed 

Different unity The file location of the version is different

( This kind of addition dll, There will be a corresponding code prompt , Feeling added fairygui Of dll There can be fairygui Code tips for )

9. ignore case , To call api The prompt is convenient

File---settings Cancel the red circle position


10. Using annotations

For example, write the following code

local go;

And then in this line of code , Press alt plus enter key

There will be one create type annotation One option , Return again

You can give it go Named the type , Direct input gameobject There will be an automatic prompt below UnityEngine.GameObject type , Select it

So this one go namely UnityEngine.GameObject Type

then go. You can point it out unity Of api The method

The annotation function is emmylua A very powerful feature , For more tips, please refer to the official website

11. other

① global search

ctrl shift f Note that the shortcut key does not conflict

perhaps edit---find---find in path

Or refer to this

② Organize code format

code---reformat code

Code needs to be selected  

ctrl + alt + L

 ③ View the specific implementation of the method

alt Hold on , Then click the mouse method

④ See where the method is called


⑤ Code folding and recovery

ctrl  shift -

ctrl  shift +

⑥ Remove wavy lines , Spelling check


Input in the input box spelling-typo This is off that will do