Skip to content

uLua Documentation v1.2.0

Choose a tag to compare

@atrapalis atrapalis released this 17 Oct 13:37
· 10 commits to main since this release

This version introduces a new simplified syntax for the base classes ExposedClass and ExposedMonoBehaviour. It is recommended to update your code to use the new implementation which does not require use of generic parameters. The previous syntax will still work, however it is now deprecated. Specific changes are detailed below.

In addition, a new feature is implemented which allows C# methods of ExposedClass and ExposedMonoBehaviour to be overriden in Lua. Methods can be declared as overridable using the [AllowLuaOverride] attribute.

uLua/API.cs:

  • Added a new RegisterIndexedType() method to replace the previously used RegisterIndexedType<T>(). These two methods are identical in functionality.

uLua/ExposedClass.cs:

  • Added a new ExposedClass script to replace the previously used ExposedClass<T>. These two scripts are identical in functionality.

uLua/ExposedMonoBehaviour.cs:

  • Added a new ExposedMonoBehaviour script to replace the previously used ExposedMonoBehaviour<T>. These two scripts are identical in functionality.
  • Added a Manual option to the ExposeOn enum. This is equivalent to None, but may be used to differentiate between scripts which will be manually exposed and those which are not intended to use in Lua.

uLua/IndexedUserDataDescriptor.cs:

  • Added a new IndexedUserDataDescriptor class to replace the previously used IndexedUserDataDescriptor<T>. These two classes are identical in functionality.
  • Added the [AllowLuaOverride] attribute and implemented it in the indexed data descriptor.