You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of printing the path the resource was created, it will be blank instead.
I was hoping it to not be blank so I could develop a reusable plugin that executed something on the folder where the resource was created.
Steps to reproduce
Save the above resource, then create a new file using said resource.
Minimal reproduction project (MRP)
n/a
The text was updated successfully, but these errors were encountered:
leandro-benedet-garcia
changed the title
get_path() returns a empty string when resource is created on disk.
get_path() in Resource returns a empty string when resource is created on disk.
May 20, 2024
leandro-benedet-garcia
changed the title
get_path() in Resource returns a empty string when resource is created on disk.
get_path() in Resource returns a empty string when it is is created on disk.
May 20, 2024
leandro-benedet-garcia
changed the title
get_path() in Resource returns a empty string when it is is created on disk.
get_path() in Resource returns a empty string when it is created on disk.
May 20, 2024
Hi! It looks like this happens because the resource is initialized before you even get to choose the path in the file picker dialog. Resources don't seem to have a notification for when they are saved to disk, but the following hacky workaround using EditorFileSystem works:
I thought that would be the issue, but what I would expect is an error to occur to tell me it could not be done, to exist a signal that is executed when a resource is created or at least a note in the documentation saying it was a expected behavior.
None of those things seem to be the case so I would say it is indeed a bug.
Ideally we would have the signal tho. That would be quite handy.
Tested versions
v4.2.1.stable.gentoo [b09f793]
System information
Godot v4.2.1.stable (b09f793) - Gentoo 2.14 - Wayland - GLES3 (Compatibility) - NVIDIA GeForce GTX 965M (nvidia; 550.67) - Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz (4 Threads)
Issue description
I have this resource file:
Instead of printing the path the resource was created, it will be blank instead.
I was hoping it to not be blank so I could develop a reusable plugin that executed something on the folder where the resource was created.
Steps to reproduce
Save the above resource, then create a new file using said resource.
Minimal reproduction project (MRP)
n/a
The text was updated successfully, but these errors were encountered: