This update adds more options for exposing game objects to Lua and tweaks the Lua API behaviour when Unity scenes are changed.
API.cs:
- The Lua API will now fully reset when a new Unity scene is loaded.
- Added a
DontDestroyOnLoad
option to the inspector UI. - Fixed a bug which prevented non-global Lua objects from automatically registering event handlers.
Lua.cs
- Logging functions have been moved to the API class. Their implementation in Lua.cs is deprecated.
ExposedMonoBehaviour.cs
- Implemented the option to expose objects on scene load events (
ExposeOn.OnSceneLoaded
). - Added a new method
OnExpose()
which can be overridden in derived classes. - The
Register()
method has been deprecated.
LuaClass.cs
- The
Register()
method has been deprecated.