Skip to content

Auto reload shader files when changed on disk#113239

Open
MartinDelille wants to merge 1 commit intogodotengine:masterfrom
MartinDelille:reload-shader
Open

Auto reload shader files when changed on disk#113239
MartinDelille wants to merge 1 commit intogodotengine:masterfrom
MartinDelille:reload-shader

Conversation

@MartinDelille
Copy link
Contributor

For most of the resources, they are automatically reloaded upon external changes. However, this is not the case for shader code.

This PR fixes that so the change is autmatically reflected both in the shader editor and in the viewport.

@MartinDelille
Copy link
Contributor Author

Would someone tell me if this could be merged ?

@kitbdev
Copy link
Contributor

kitbdev commented Jan 9, 2026

Shaders in the text Shader Editor are already reloaded when edited externally.
Is there an open issue for this, and do you have reproduction steps for it not happening?

@MartinDelille
Copy link
Contributor Author

When I edit externally a shader, it is reloaded only if Godot editor is focused again. I believed at the time I wrote the PR it did. I remember it was the case for other kind of resource like image but I can't reproduce with the current master.

@kitbdev
Copy link
Contributor

kitbdev commented Jan 10, 2026

I don't think anything in the Editor reloads immediately before it gets focused, and I'm not sure when it would have done that.
Also I tested and this implementation doesn't change that, Shader files are still only reloaded on focus. The signal used doesn't emit immediately on file change, only when a scan happens.

@Repiteo Repiteo requested a review from a team as a code owner February 17, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants