- Edited
After duplicating a resource at runtime, resource.resource_path
returns empty is this an intended behaviour?.
How can I find a path to the original resource.tres file from a duplicated resource?
After duplicating a resource at runtime, resource.resource_path
returns empty is this an intended behaviour?.
How can I find a path to the original resource.tres file from a duplicated resource?
I suspect that the path is filled in by the editor, when you duplicate it there. It kind of makes sense that you wouldn't have a path in a duplicate. The easy answer is to copy the path name when you duplicate them in code. I'd make a new property with set_meta() to store it, just in case setting the actual path caused problems.