diff options
author | Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com> | 2022-12-30 01:29:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-30 01:29:53 +0100 |
commit | 0daa86d70e7338506c37bee6b6e0c4aba7255d68 (patch) | |
tree | 56183030d38d6893fd661dabe5c6495412c06a4e /modules/mono/glue | |
parent | a75493091823020d858fabadbfa5994da0d658cb (diff) | |
parent | a43e8285a7df01edd5a1fb523ca91c233fa1f5b8 (diff) |
Merge pull request #70511 from raulsntos/dotnet/fix-update-script-class-info
C#: Skip getting class info for unbound generics
Diffstat (limited to 'modules/mono/glue')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs index e6a8054ae2..dafa83431b 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs @@ -297,7 +297,7 @@ namespace Godot.Bridge foreach (var type in assembly.GetTypes()) { - if (type.IsNested) + if (type.IsNested || type.IsGenericType) continue; if (!typeOfGodotObject.IsAssignableFrom(type)) @@ -314,9 +314,12 @@ namespace Godot.Bridge if (scriptTypes != null) { - for (int i = 0; i < scriptTypes.Length; i++) + foreach (var type in scriptTypes) { - LookupScriptForClass(scriptTypes[i]); + if (type.IsGenericType) + continue; + + LookupScriptForClass(type); } } } @@ -729,6 +732,7 @@ namespace Godot.Bridge { ExceptionUtils.LogException(e); *outTool = godot_bool.False; + *outMethodsDest = NativeFuncs.godotsharp_array_new(); *outRpcFunctionsDest = NativeFuncs.godotsharp_dictionary_new(); *outEventSignalsDest = NativeFuncs.godotsharp_dictionary_new(); *outBaseScript = default; |