bug 1

  • Type UnityEngine.Light' does not contain a definition forshadowRadius’ and no extension method shadowRadius' of typeUnityEngine.Light’ could be found. Are you missing an assembly reference?

参考地址

  1. 找到在 Assets\XLua\Src\Editor\Generator.cs 中的方法
    public static void GetGenConfig(IEnumerable check_types)

  2. 在这个方法的BlackLIst黑名单新增这会导致报错的成员(原本是空的)
    BlackList = new List<List>()
    {
    new List(){“UnityEngine.Light”, “shadowRadius”},
    new List(){“UnityEngine.Light”, “shadowAngle”},
    new List(){“UnityEngine.Light”, “SetLightDirty”},
    };

  3. 生成并注入(Xlua/Generate Code、Hotfix Inject in Editor)

  4. 最后进行打包,成功

xlua bug 合集

相关文章: