Merge pull request #94047 from KoBeWi/resource_printer
Improve `to_string()` and add it to Resource
This commit is contained in:
@ -1044,7 +1044,7 @@ String Object::to_string() {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return "<" + get_class() + "#" + itos(get_instance_id()) + ">";
|
||||
return _to_string();
|
||||
}
|
||||
|
||||
void Object::set_script(const Variant &p_script) {
|
||||
@ -1839,6 +1839,10 @@ void Object::notify_property_list_changed() {
|
||||
emit_signal(CoreStringName(property_list_changed));
|
||||
}
|
||||
|
||||
String Object::_to_string() {
|
||||
return "<" + get_class() + "#" + itos(get_instance_id()) + ">";
|
||||
}
|
||||
|
||||
void Object::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_class"), &Object::get_class);
|
||||
ClassDB::bind_method(D_METHOD("is_class", "class"), &Object::is_class);
|
||||
|
||||
Reference in New Issue
Block a user