mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Improve to_string() and add it to Resource
This commit is contained in:
parent
9a5d6d1049
commit
e6783dbdd1
13 changed files with 53 additions and 61 deletions
|
|
@ -1044,7 +1044,7 @@ String Object::to_string() {
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
return "<" + get_class() + "#" + itos(get_instance_id()) + ">";
|
||||
return _to_string();
|
||||
}
|
||||
|
||||
void Object::set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance) {
|
||||
|
|
@ -1850,6 +1850,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue