Unity project configuration xLua environment

Unity project configuration xLua environment


Get xLua

First go to GitHub to get the latest version. GitHub Portal
Figure 1

method of obtaining

  • If Git is installed on the computer, just Clone with HTTPSdownload: select 1 -> 3(not recommended: slow download speed).
  • Git is installed on the computer, and the ssh public key is configured on GitHub, just Clone with SSHdownload: select 1 -> 2 -> 3(suggestion: this way you can get the latest xLua, which also has a case, and the download speed is not bad).
  • If your computer doesn't have Git, or GitHub doesn't have an ssh public key, or you don't want to bother, then you can directly download the ZIP file: choose 4.

Import into Unity

  • Open Unity and create a new project.

  • Open the downloaded resource, copy Pluginsthe folder and XLuafolder in the resource file to Assetsthe folder in the Unity project directory; Toolscopy the folder in the resource file to the Unity project directory, which is at the same level as Assets .

    Figure II

Figure three
– If you don’t want those cases anymore, just delete the folder XLuaunder it .Examples

Figure four

  • Open Unity again, after the editor is compiled, the editor may report an error, ignore it, and then customize the macro: open to File > Build Settings > Player Settings > Other Settingsfind Scripts Define Symbolsthe item, enter it in the input box HOTFIX_ENABLEand press Enter to close the settings. For details, see: Hot Patch Operation Guide

  • Find the option in the toolbar , and there will be three options XLuaafter opening: Generate Code, Clear Generate Code, . : compile code: clear compiled code: inject codeHotfix Inject In Editor
    Figure five
    Generate Code
    Clear Generate Code
    Hotfix Inject In Editor

    At this point, click in sequence Clear Generate Code -> Generate Code -> Hotfix Inject In Editor . When the or waits for the log in
    Unity , the configuration is complete.Consolehotfix inject finish!inject finish!

  • When packaging and publishing, XLuathere are Examplesfolders that need to be deleted first, and then click the , , three options XLuaunder .Clear Generate CodeGenerate CodeHotfix Inject In Editor

Ending: The previous record has not been published, and the one-time configuration is completed. There is no problem encountered in the middle. If you encounter any problems, you can leave a message and learn and discuss together.

Guess you like

Origin blog.csdn.net/weixin_43830069/article/details/107444762