Seems like it cannot find any classes.
SCRIPT ERROR: Parse Error: Could not find type "CameraRigTP" in the current scope.
SCRIPT ERROR: Parse Error: Identifier "AI" not declared in the current scope.
Bezier

- Joined Oct 2, 2023
- 0 best answers
I went and looked at this:
Try setting Depth Draw Mode to always.
- Edited
xyz I suppose that writing "value", or just the word "variable" alone would have better carried what I meant.
In any case, I was not aware that variables can be static now. This was pretty well hidden from search results with outdated answers that claim the opposite showing up instead. So in case anyone else stumbles here, Static variables: https://docs.godotengine.org/en/4.2/tutorials/scripting/gdscript/gdscript_basics.html#static-variables
With this knowledge, we can get rid of most of our autoload code immediately.
On 4.2.2. I want to set up a step on github CI to validate all gdscript in the project. There is a workaround to run
--check-only
on all scripts, but it fails:SCRIPT ERROR: Compile Error: Identifier not found: Globals ... ERROR: Failed to load script "res://classes/example.gd" with error "Compilation failed".
It doesn't know of the autoload and fails.
So my questions are:
- Is it possible to get my autoloads loaded before the script is compiled?
- Is there another way to validate the scripts?
Thanks.
I found a few people have asking this, but I haven't found a good answer.
So my custom tool nodes can be dragged over each other in the editor to "connect" them. Now, when I delete one, I want the other nodes to forget it.
Some things I've tried so far:
NOTIFICATION_PREDELETE:
Not called. Nodes aren't actually freed when deleted in editor. https://github.com/godotengine/godot/issues/84366tree_exited signal:
Not enough as is. Covers node deletion, but also many other cases, like changing scene tabs. If I there's some additional "deleted in the editor" status that I can check, this would work.
Any ideas?
- Edited
I see there's already an answer, but I'll finish mine anyway.
The GPU is very good at running many threads of same code in parallel. Like in a game, running the same shader code for many pixels at the same time. Branches are not executed in parallel, but one at a time.
If you do a simple if statement, thethen
branch is first executed, while the threads that take theelse
branch are just idling, and then vice versa. A switch with many cases could be catastrophic for performance.
The processing time can be as if every pixel you're drawing takes every single branch.Note: After seeing the other answer, I'd like to point out that this will not matter with whatever you're doing in gdscript unless it's really bad or has to be really optimized for some insane reason. The only project where CPU branching was a bottleneck for me was pushing an interpreter emulator.
I've been there, and unfortunately it wasn't possible.
But check out the gizmo in this old project of mine:
It only has translation, but it might be helpful. You can copy the gizmo, if you like.https://github.com/sevonj/sr2_chonker/tree/0.0.7/scenes/editor/gizmo (0.0.7 branch, not master)
Hi, anyone here experienced with 3d gizmo plugins or working with the editor viewport?
When setting and committing a handle, is there a way to detect if the handle is hovering over another node or its gizmo?
I essentially want to connect my custom nodes by dragging the handle over the other one.
Thanks.
I also asked about it here: https://programming.dev/post/3806068. There's a bit more context about my project.