xLua
xLua copied to clipboard
xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
我在编辑器里编译成功,也能正常运行. > finished! use 3389.5061 ms C:\project\unity\ShuimuPad\Library\ScriptAssemblies\Assembly-CSharp.dll had injected! 可是我在安卓里 也编译成功,可是报错了 xlua.access > C:\project\unity\ShuimuPad\Library\ScriptAssemblies\Assembly-CSharp.dll had injected! `Autoconnected Player LuaException: xlua.access, no field __Hotfix0_InitUi stack traceback: [C]: in field 'access' [string...
## 编译方法: * 添加第三方库: ``` #begin lfs set (LFS_SRC lfs/lfs.c) set_property( SOURCE ${LFS_SRC} APPEND PROPERTY COMPILE_DEFINITIONS LUA_LIB ) list(APPEND THIRDPART_INC lfs) set (THIRDPART_SRC ${THIRDPART_SRC} ${LFS_SRC}) #end lfs #begin bitop set...

1. 实现一个静态的c#方法,以GameObject为参数 `public static void SetPosition(GameObject go,float x,float y,float z)` 2. lua 层调用的时候,传入了错误参数,传 luatable对象时,不仅没有报错,还会在场景中创建一个 New Game Object。 `local t= {}` `SetPosition(t,0,0,0)` 希望能报个类型错误,如果有性能问题,至少在editor下检查。
Assets\XLua\Gen\UnityEngine_LightWrap.cs(189,39): error CS1061: 'Light' does not contain a definition for 'SetLightDirty' and no accessible extension method 'SetLightDirty' accepting a first argument of type 'Light' could be found (are you missing...
It'd be nice if you could make a NuGet Package for use in non-Unity projects.
``` public class Father { public virtual bool IsBestMan { get; set; } = true; } public class Son : Father { //如何让我现在的IsBestMan是false } ``` xlua ``` //不对 xlua.hotfix(CS.Son, "IsBestMan...
[Luau](https://luau-lang.org/)
 项目中使用了SortedSet,在执行Hotfix Inject In Editor会抛异常,看报错应该是找不到这个类