Resource Proxies #6314
Replies: 2 comments 4 replies
-
It seem just a object which container a resource path as peoperty, and provide a series of methods to access the target resource, right? I think it is easy to be implemented, but it is necessary? If this class it used in editor, in order to save it's instacne in a scne file(*.tscn/ *.scn), it should be a resource, too. |
Beta Was this translation helpful? Give feedback.
-
@Daylily-Zeleen A PropertyHint would work just as well; But I'm unaware of how the editor would keep track of this. During the implementation of Perhaps something similar can be done for a Then, if |
Beta Was this translation helpful? Give feedback.
-
There's something that I'd like to turn into a proposal but would like to discuss first,
In my framework I needed a way to refer to a resource on disk without loading it. I did so by implementing
ResourceProxy : Resource
which stores the file and can be askedget_resource()
to retrieve the resource,load
,preload
, too.It cuts the work a lot by making it basically a
RefCounted
string and I only have to update it once. Still, given that Godot has the ability of updating resource paths for exported resources on scenes when you move resources in the file system, it would be great to have the editor watch over a file as I move it around, but the scene to not load it when instantiated.Beta Was this translation helpful? Give feedback.
All reactions