Merge pull request #94047 from KoBeWi/resource_printer

Improve `to_string()` and add it to Resource
This commit is contained in:
Thaddeus Crews 2025-10-16 12:48:11 -05:00
commit 60710df3b6
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
13 changed files with 53 additions and 61 deletions

View file

@ -660,6 +660,10 @@ void Resource::reset_local_to_scene() {
// Restores the state as if setup_local_to_scene() hadn't been called.
}
String Resource::_to_string() {
return (name.is_empty() ? "" : String(name) + " ") + "(" + path_cache + "):" + Object::_to_string();
}
Node *(*Resource::_get_local_scene_func)() = nullptr;
void (*Resource::_update_configuration_warning)() = nullptr;

View file

@ -122,6 +122,7 @@ protected:
GDVIRTUAL0(_reset_state);
virtual Ref<Resource> _duplicate(const DuplicateParams &p_params) const;
virtual String _to_string() override;
public:
static Node *(*_get_local_scene_func)(); // Used by the editor.