You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
CSharpScript should not own method infos of the base class
This commit is contained in:
committed by
Paul Joannon
parent
7ebc866418
commit
c313312ff5
@@ -1596,14 +1596,7 @@ void CSharpInstance::get_method_list(List<MethodInfo> *p_list) const {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CSharpScript *top = script.ptr();
|
script->get_script_method_list(p_list);
|
||||||
while (top != nullptr) {
|
|
||||||
for (const CSharpScript::CSharpMethodInfo &E : top->methods) {
|
|
||||||
p_list->push_back(E.method_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
top = top->base_script.ptr();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSharpInstance::has_method(const StringName &p_method) const {
|
bool CSharpInstance::has_method(const StringName &p_method) const {
|
||||||
|
|||||||
@@ -804,11 +804,11 @@ namespace Godot.Bridge
|
|||||||
using var methods = new Collections.Array();
|
using var methods = new Collections.Array();
|
||||||
|
|
||||||
Type? top = scriptType;
|
Type? top = scriptType;
|
||||||
Type native = GodotObject.InternalGetClassNativeBase(top);
|
Type native = GodotObject.InternalGetClassNativeBase(scriptType);
|
||||||
|
|
||||||
while (top != null && top != native)
|
if (scriptType != null && scriptType != native)
|
||||||
{
|
{
|
||||||
var methodList = GetMethodListForType(top);
|
var methodList = GetMethodListForType(scriptType);
|
||||||
|
|
||||||
if (methodList != null)
|
if (methodList != null)
|
||||||
{
|
{
|
||||||
@@ -859,8 +859,6 @@ namespace Godot.Bridge
|
|||||||
methods.Add(methodInfo);
|
methods.Add(methodInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
top = top.BaseType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*outMethodsDest = NativeFuncs.godotsharp_array_new_copy(
|
*outMethodsDest = NativeFuncs.godotsharp_array_new_copy(
|
||||||
|
|||||||
Reference in New Issue
Block a user