Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List all resources (pre)loaded in script #26497

Open
KoBeWi opened this issue Mar 2, 2019 · 0 comments
Open

List all resources (pre)loaded in script #26497

KoBeWi opened this issue Mar 2, 2019 · 0 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Mar 2, 2019

Godot version:
3.1 beta 10

Issue description:
So, I once randomly thought that it would be nice if we somehow could get a list of resources "used" by script. Right now only scene resource references are kept anywhere, so Godot warns you if e.g. removing a resource will break any dependencies. This is untrue for scripts, even though they might have some dependencies created by their (pre)loads.

My initial idea was as much as even storing where the resource is referenced in script, so e.g. moving a resource could automatically update the script. This is however unecessary if #15673 was implemented.

Anyways, keeping track of script-used resources would be useful e.g. when trying to determine where something is used and it's not referenced in scene. Or when having a script doing lots of (pre)loading so you want a list of resources, like you can get from a node.

The 2 problems I see are that it works only for fixed load paths and that scanning scripts might be costly, as they are less organized than scene dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants