Implement CSharpScript::inherits_script()
(cherry picked from commit 840255a04b
)
This commit is contained in:
parent
7426b3fa91
commit
417a69c643
1 changed files with 9 additions and 2 deletions
|
@ -3211,8 +3211,15 @@ bool CSharpScript::inherits_script(const Ref<Script> &p_script) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
WARN_PRINT_ONCE("Implement CSharpScript::inherits_script and other relevant changes after GH-38063.");
|
||||
return false;
|
||||
if (script_class == nullptr || cs->script_class == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (script_class == cs->script_class) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return cs->script_class->is_assignable_from(script_class);
|
||||
}
|
||||
|
||||
Ref<Script> CSharpScript::get_base_script() const {
|
||||
|
|
Loading…
Reference in a new issue