From a6455c4c6cce3714d23088ef3849adbb0206a6df Mon Sep 17 00:00:00 2001 From: Cosine Date: Sat, 14 May 2022 18:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E5=8C=BF=E5=90=8D=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E7=94=9F=E6=88=90=EF=BC=8C=20=E5=B1=8F?= =?UTF-8?q?=E8=94=BDProtected=E5=8F=82=E6=95=B0=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/XLua/Src/Editor/Generator.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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();