-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Script removed from node upon preload scene in cyclic reference. #76641
Comments
So, I have found out that the script will remain attached to the scene if you edit the player.gd script by changing the |
Actually, it seems that fix is only temporary? I started up my PC today and loaded it, and the script was detached again. |
One of the cause of this issue might be this code. Dependency error is detected here, but no errors are generated. As a result, script is set to null (=removed). godot/scene/resources/resource_format_text.cpp Lines 164 to 166 in 809a982
|
Why does GDScriptAnalyzer permit cyclic references? Does GDSCript2.0 actually support it? godot/modules/gdscript/gdscript_analyzer.cpp Lines 3908 to 3909 in 809a982
|
@heppocogne Yes, GDScript 2.0 has a (limited) support for cyclic references |
Had a similar issue where using load fixed the whole project. |
Godot version
4.0.3.rc1
System information
Windows Vulkan API 1.3.217 - Forward Mobile -AMD Radeon(TM) Vega 8 Graphics
Issue description
bullet.gd
player.gd
When running the
bullet.tscn
scene, the following errors will be reportedThe script will be lost after restarting the editor.
See video:
preload_scene_bug.mp4
BUG found from the PR(godotengine/godot-demo-projects#849) of Calinou in #75039
Other related issues:
I can reproduce the problem again from its MRP #74110.
I'm not sure if it's related to this, but there's some discussion in #68661.
Steps to reproduce
Maybe if you open the project, you will lose the bullet script, please make sure that the bullet is attached to the scene.
Minimal reproduction project
preload_scene_cyclic.zip
The text was updated successfully, but these errors were encountered: