You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Implement CSharpScript::inherits_script()
(cherry picked from commit 840255a04b)
This commit is contained in:
committed by
Pedro J. Estébanez
parent
7426b3fa91
commit
417a69c643
@@ -3211,8 +3211,15 @@ bool CSharpScript::inherits_script(const Ref<Script> &p_script) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
WARN_PRINT_ONCE("Implement CSharpScript::inherits_script and other relevant changes after GH-38063.");
|
if (script_class == nullptr || cs->script_class == nullptr) {
|
||||||
return false;
|
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 {
|
Ref<Script> CSharpScript::get_base_script() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user