-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Circular dependencies of scenes (by preload) cause a script can not be loaded #70985
Closed
Tracked by
#80877
Labels
Milestone
Comments
jinyangcruise
changed the title
Circular dependencies(by preload) cause a script can not be load
Circular dependencies(by preload) cause a script can not be loaded
Jan 6, 2023
cc @adamscott |
I confirm this issue. This does not seem to be a regression. I'm investigating. |
This was referenced Jan 15, 2023
For more info on this issue and why it's currently difficult to fix it, see the comments of my closed PR #71004. |
adamscott
changed the title
Circular dependencies(by preload) cause a script can not be loaded
Circular dependencies of scenes (by preload) cause a script can not be loaded
Jun 13, 2023
I put up #80854 to help make the user experience of this engine limitation easier to debug/deal with. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
v4.0.beta10.official [d0398f6]
System information
Vulkan API 1.3.205 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Ti
Issue description
My project contains two scenes "cell.tscn"(attached with a script "cell.gd") and "swap_pad.tscn" (attached with a script "swap_pad.gd"). Everytime I open this project, the "cell.tscn" always lose its script "cell.gd" with an error log :
I need to re-attach this script to the scene to fix it temporarily but next time this problem happen again.
I finally figured out this problem happens if two scripts have circular dependencies. I don't know if this problem is or not a bug of Godot. If not, why can I fix it temporarily by re-attach the script to the scene.
Content of "cell.gd":
Content of "swap_pad.gd"
Steps to reproduce
0.download minimal reproduction project below
Minimal reproduction project
test1.zip
The text was updated successfully, but these errors were encountered: