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

Use relative instead of global paths in resources #2607

Closed
Jummit opened this issue Apr 15, 2021 · 1 comment
Closed

Use relative instead of global paths in resources #2607

Jummit opened this issue Apr 15, 2021 · 1 comment

Comments

@Jummit
Copy link

Jummit commented Apr 15, 2021

Describe the project you are working on

An addon.

Describe the problem or limitation you are having in your project

Since addons can be put into subfolders now (godotengine/godot#43734), I put downloaded plugins in res://addons/thirdparty for organization. This breaks most plugins though, as they use global paths, for example res://addons/plugin/resource.tres.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

If a resource is stored inside a file (.tscn, .tres, etc), the paths should be saved relative to the file.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Inside res://addons/plugin/test.tscn:

test.png -> res://addons/plugin/test.png

If this enhancement will not be used often, can it be worked around with a few lines of script?

You can manually replace the paths with local ones, but they get overridden once you save the resource.

Is there a reason why this should be core and not an add-on in the asset library?

It's core.

@Jummit
Copy link
Author

Jummit commented Apr 15, 2021

I realize new that this is kinda a duplicate of #2375 and #2327, closing. The only difference is that this proposal says it should be default.

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