From 61ad492fcba7569afa476557a1c307c55a47d7bb Mon Sep 17 00:00:00 2001 From: Pawel Sulik Date: Sun, 17 Nov 2024 23:05:13 +0100 Subject: [PATCH 1/2] Blacklist all methods with specific parameter --- Assets/XLua/Src/Editor/Generator.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/XLua/Src/Editor/Generator.cs b/Assets/XLua/Src/Editor/Generator.cs index b20fa1d15..a412a5da3 100644 --- a/Assets/XLua/Src/Editor/Generator.cs +++ b/Assets/XLua/Src/Editor/Generator.cs @@ -566,6 +566,8 @@ static bool isMethodInBlackList(MethodBase mb) { if (mb.DeclaringType.ToString() == exclude[0] && mb.Name == exclude[1]) { + if(exclude.Count == 3 && string.Equals(exclude[2], "All") + return true; // Blacklist all methods with this name; var parameters = mb.GetParameters(); if (parameters.Length != exclude.Count - 2) { From f789c418246011c46c0d5e9bec43ae3876530749 Mon Sep 17 00:00:00 2001 From: Pawel Sulik Date: Sun, 17 Nov 2024 23:11:47 +0100 Subject: [PATCH 2/2] Updated Readme. --- Assets/XLua/Doc/Configure_EN.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/XLua/Doc/Configure_EN.md b/Assets/XLua/Doc/Configure_EN.md index c4690a481..ae7268e31 100644 --- a/Assets/XLua/Doc/Configure_EN.md +++ b/Assets/XLua/Doc/Configure_EN.md @@ -120,6 +120,9 @@ public static List> BlackList = new List>() { //new List(){ typeof(UnityEngine.GameObject).FullName, "networkView"}, new List(){"System.IO.FileInfo", "GetAccessControl", "System.Security.AccessControl.AccessControlSections"}, //new List(){ typeof(System.IO.FileInfo).FullName, "GetAccessControl",typeof(System.Security.AccessControl.AccessControlSections).FullName }, + + // If you want to blacklist all methods with specific name, use "All" as first parameter type: + new List() { "UnityEngine.Debug", "Log", "All" }, }; ~~~