Skip to content

Use Lua scripting language in Unity to accomplish hot update/fix functionality

License

Notifications You must be signed in to change notification settings

jcs090218/UnityLua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT Unity Engine Release

Unity Lua

Use Lua scripting language in Unity to accomplish hot update/fix functionality.

Build Status

Project built on top of the tolua by topameng.

This is the minimal project that shows you how to use tolua in your own project.

Why use ToLua for your game?

When you came of hot-update, you would need a scripting language that can be compile or use after the binary is built.

Pros

  • Hot update/fix - you are able to change game logic without compile from C# to binary.
  • Lua is easy to learn.

Cons

  • No auto-completion and debugging tool. (Maybe in the future?)
  • You would have to do extra comilation every time you want to port a function from C# to Lua programming interface.
  • Unstable, easy to break.
  • Slower than C# in general.

About ToLua

Here is a quick start that teaches you to use tolua in under a minute.

  • Assets/ToLua/Editor/Custom/CustomSettings.cs
  • Assets/ToLua/Source/LuaConst.cs

These files are the only files that you need to be aware of to customize tolua. Basically all the export and path settings are listed in these files.

Done!!!

Examples

There are few files that you would need to see before you know how to use tolua's functionality.

All C# & Lua scripts under /Assets/_Project/Scripts folder.

Done!!!

About

Use Lua scripting language in Unity to accomplish hot update/fix functionality

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published