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

Changing scripts in the script editor should reload script #30441

Open
TheDuriel opened this issue Jul 8, 2019 · 5 comments
Open

Changing scripts in the script editor should reload script #30441

TheDuriel opened this issue Jul 8, 2019 · 5 comments

Comments

@TheDuriel
Copy link
Contributor

Godot version:

3.1

Issue description:

When you open a script in the script editor, by clicking on it in the left pane. The script is not reloaded. Currently a script is only reloaded error checked when you open it from disk (subsequently adding it to the script list), or make a change to its contents.

Lets say you have two scripts, A and B.

Script B uses script A through its class_name, but a script error in script A causes script B to correctly throw a script error/cyclic preload error.
Changing to script A, fixing the error, and changing back to script B does not resolve the error until a change is made to script B. (For example adding a space/new line, then removing it.)

@Anutrix
Copy link
Contributor

Anutrix commented Jul 9, 2019

i.e, parser doesn't do code_check unless a visible(i.e, is in same script not its dependency) change happens in the script?

@Ranoller
Copy link
Contributor

Probably this was fixed by #28695 , but should test in master.

@Anutrix
Copy link
Contributor

Anutrix commented Jul 17, 2019

If it's still not fixed maybe call to reload_all_scripts() might work(Just a wild guess). But I am not sure if it'll cause performance issues.

@codecustard
Copy link
Contributor

Could you provide a sample project?

@aaronfranke
Copy link
Member

Can someone please provide a minimal reproduction project that shows the problem in the latest master branch?

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

6 participants