错误描述:
Assets\XLua\Gen\UnityEngineLightWrap.cs(1010,35): error CS1061: ‘Light’ does not contain a definition for ‘shadowRadius’ and no accessible extension method ‘shadowRadius’ accepting a first argument of type ‘Light’ could be found (are you missing a using directive or an assembly reference?)
处理方法:
编辑Generator.cs 的GetGenConfig()
public static void GetGenConfig(IEnumerable check_types)
{
LuaCallCSharp = new List();
CSharpCallLua = new List<Type>();
GCOptimizeList = new List<Type>();
AdditionalProperties = new Dictionary<Type, List<string>>();
ReflectionUse = new List<Type>();
BlackList = new List<List<string>>()
{
//在这里添加
new List<string>(){"UnityEngine.Light", "shadowRadius"},
new List<string>(){"UnityEngine.Light", "SetLightDirty"},
new List<string>(){"UnityEngine.Light", "shadowAngle"},
new List<string>(){"UnityEngine.Light", "shadowAngle"}
};
HotfixCfg = new Dictionary<Type, HotfixFlag>();
OptimizeCfg = new Dictionary<Type, OptimizeFlag>();
DoNotGen = new Dictionary<Type, HashSet<string>>();