Improve to_string() and add it to Resource

This commit is contained in:
kobewi 2024-07-07 20:18:35 +02:00
parent 9a5d6d1049
commit e6783dbdd1
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.