-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[GDScript] Loading non-existing gdscript returns valid instance. #76941
Comments
godot/modules/gdscript/gdscript.cpp Lines 2592 to 2610 in fbb1a92
Seems if not exist it will instantiate. cc @vnen |
Currently, there doesn't seem to be a distinction between errors in parsing and errors in godot/modules/gdscript/gdscript_cache.cpp Line 256 in fd4a06c
|
This leads to a bug where opening a scene with missing script dependencies will open them as empty scripts. |
I was looking at the linked PR and I'm not 100% it's the best approach. I think the real issue is that in C++, I suspect the right behavior is still to return the most-parsed/analyzed script possible, but still have access to an error of some sort... though I have no idea how we'd go about implementing that, unless we had some weird |
Godot version
4.1.dev
System information
Win11
Issue description
I load a non-existing GDScript, but it still returns a valid instance instead of null.
Steps to reproduce
N/A
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: