diff --git a/Assets/XLua/Src/Editor/Generator.cs b/Assets/XLua/Src/Editor/Generator.cs index df0ffbf56..bbdb27f79 100644 --- a/Assets/XLua/Src/Editor/Generator.cs +++ b/Assets/XLua/Src/Editor/Generator.cs @@ -900,7 +900,14 @@ static void GenDelegateBridge(IEnumerable types, string save_path, IEnumer { string filePath = save_path + "DelegatesGensBridge.cs"; StreamWriter textWriter = new StreamWriter(filePath, false, Encoding.UTF8); - types = types.Where(type => !type.GetMethod("Invoke").GetParameters().Any(paramInfo => paramInfo.ParameterType.IsGenericParameter)); + + types = types + .Where(type => + !type.GetMethod("Invoke").GetParameters() + .Any(paramInfo => paramInfo.ParameterType.IsGenericParameter | + (paramInfo.ParameterType.IsNested & paramInfo.ParameterType.IsNestedFamily))) + .Where(type => !type.FullName.Contains("<>f__")); + var hotfxDelegates = new List(); var comparer = new MethodInfoSimulationComparer();