Comments (4)
When project is opened, Godot scans the filesystem and updates class cache. It's been made much more reliable recently. Previously some scripts could be missed because the scan was buggy.
You can add .gdignore file to your folder if you want to keep files, but have them ignored.
from godot.
The problem is, that class_name
classes that inherit node, get an entry in the create node dialogue. Also they could be used in every other script by their class name. In those cases there is no way to know which of your two scripts with the same class name is meant. Therefore class_names have to be unique across all scripts.
The class names are a unique identifier for a script so we need to know which script is meant, only given a class name. (Note, how this decision would have to be made before we could even say which scripts will run.)
Furthermore, we can't know which scripts are run with 100% certainty, since you can always use load
to dynamically load and run a script. (Comes down to the halting problem. This could only be analyzed for a subset of all possible scripts, we can't rely on it therefore)
from godot.
The problem is, that
class_name
classes that inherit node, get an entry in the create node dialogue. Also they could be used in every other script by their class name. In those cases there is no way to know which of your two scripts with the same class name is meant. Therefore class_names have to be unique across all scripts.The class names are a unique identifier for a script so we need to know which script is meant, only given a class name. (Note, how this decision would have to be made before we could even say which scripts will run.)
Furthermore, we can't know which scripts are run with 100% certainty, since you can always use
load
to dynamically load and run a script. (Comes down to the halting problem. This could only be analyzed for a subset of all possible scripts, we can't rely on it therefore)
I see, but can you explain why this was previously not a problem in Godot 4.1.4? Was that just a bug?
from godot.
Unused scripts are not fully loaded, but the editor checks their class_name
s and registers them with the ScriptServer
. Then, when loading a script with the same class_name
, GDScript generates an error.
from godot.
Related Issues (20)
- Changing `global groups` of a scene and going to another scene crashes the editor HOT 1
- After parser error, exported members become null (or NodePaths become empty) HOT 2
- [Visual Shader] Texture2dParameter node accepts instance qualifier. HOT 1
- [VisualShader] Default vec4 options are very hard to write to
- Godot hangs when using ".GetAwaiter().GetResult()" in overrided Godot's method (e.q. _Ready) HOT 1
- In code comments, single or double quote inside pair of brackets breaks bracket matching, showing brackets in red when near caret HOT 3
- Inverted shadows on web export when running in Safari HOT 1
- macOS: App signing fails when using C# HOT 4
- Dead keys trigger two times every other press when used as input on Windows
- `EditorNode3DGizmo::add_collision_triangles` replaces previous meshes instead of adding HOT 1
- RectangleShape2D Differs In-Game
- Godot freezes my entire computer under several different conditions
- Godot application does not focus the window when launched from another client (itch, editor, steam, etc)
- [AnimationTree Optimizer] .blend / .glb animation interpolation error HOT 2
- Local to scene resource unlinks in inherited scenes when changed outside them HOT 4
- Crash when trying to modify Emitting parameter on CPUParticles2D when Signal finished() is linked to queue_free() HOT 1
- Crash when transitioning between scenes with SDFGI enabled and disabled respectively HOT 1
- Web export with gdextension not working on 4.3 HOT 5
- AudioStreamInteractive: Pop and mistiming in seamless transitions
- Version 3.6.rc1 freezing when try to export AAB. APK export works fine.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.