Releases: antUnity/uLua-docs
uLua Documentation v1.1.0
Note: If you are updating to this version, make sure to update your API script settings as some inspector options have been renamed.
This version includes several improvements and some new features. The changes are detailed below.
uLua/API.cs:
- Reworked how external user scripts are loaded. User scripts can now be placed in a folder named after the scene they are intended for under the designated path 'UserScriptsPath'.
- Reworked how scene scripts are loaded. The name of the currently active scene is now used for scene scripts. Scene scripts loaded from the external directory must have the same name and be placed in a folder named after the scene they are intended for.
- Added methods to the API class to save and load data from a Lua object. This feature may be used to save settings or other data and load it seamlessly back into your API in-between playthroughs.
- Added a public static field 'UserScriptsPath' to the API class, which was previously private.
- Deprecated public field 'ResourceDirectory' of the API class, now called 'ResourcePath'.
- Renamed 'AllowExternalSceneScript' and 'AllowExternalScripts' to 'EnableSceneScript' and 'EnableUserScripts' correspondingly.
- Fixed a crash caused by registering and invoking a null event handler value.
uLua/ExposedClass.cs:
uLua/ExposedMonoBehaviour.cs:
- Added calls to 'OnLoad' and 'OnExit' callback functions when objects are created and destroyed.
- Added warnings for when attempting to call InvokeLua() without having exposed an object to Lua.
uLua/Lua.cs:
- Added a warning for when attempting to expose an already exposed object to the API.
uLua Documentation v1.0.0
uLua is a Game API framework for Unity. It aims to streamline the development of a Game API in Lua for your Unity Project.
uLua wraps around MoonSharp and provides an object oriented framework for API development in Lua.
It works by setting up an application-wide Lua context and exposing game objects to it.
Objects exposed to Lua can then be accessed in Lua scripts to implement game behaviour.
In addition, user-defined Lua scripts may be executed at runtime to allow modding of your project.
uLua implements the following features:
- Script execution framework which allows Lua scripts to be executed from the Resources folder or an external directory.
- Event handling system which allows you to invoke events in C# and handle them in Lua.
- Base classes which expose your game objects and data structures to Lua in order to develop your Game API.
- Callback function system for your Game API objects.