public static void Register(UniLua.ILuaState L) { L.BeginEnum("MyEnum"); L.RegVar("A", get_A, null); L.RegVar("B", get_B, null); L.RegVar("C", get_C, null); L.EndEnum(); }
public static void Register(UniLua.ILuaState L) { L.BeginStaticLib("MyStaticLib"); L.RegVar("field", get_field, set_field); L.RegVar("property", get_property, set_property); L.RegFunction("Function", Function); L.EndStaticLib(); }
public static void Register(UniLua.ILuaState L) { L.BeginClass(typeof(TestUniToLua.TestClasses.MyClass), null); L.RegFunction("New", _CreateMyClass); L.RegVar("memberField", get_memberField, set_memberField); L.RegVar("staticField", get_staticField, set_staticField); L.RegVar("staticProperty", get_staticProperty, set_staticProperty); L.RegVar("memberProperty", get_memberProperty, set_memberProperty); L.RegFunction("StaticFunction", StaticFunction); L.RegFunction("MemberFunction", MemberFunction); L.RegFunction("ToString", ToString); L.RegFunction("Equals", Equals); L.RegFunction("GetHashCode", GetHashCode); L.RegFunction("GetType", GetType); L.EndClass(); }