We need to update the scene root in multiple singletons to ensure that
certain flags are correct. This is what `EditorNode::set_edited_scene()`
does.
Usually we use `replace_by` to complete the replacement of the scene
root. Call `EditorNode::set_edited_scene()` when the `replacing_by`
signal is emitted to set the new scene root. This is suitable when
using a single node to replace, which may be problematic if the
replacing node is a tree. Because during the call to `replace_by()`,
the new node and its child nodes will enter tree during `parent->
add_child(p_node)`, and later emits the `replacing_by` signal.
When the parent scene has to be reloaded because the child scene
changes and switches to the parent scene, there is no need to use
`replace_by()` since the scene's diffs are already saved.
- Rename it to Engine Compilation Configuration Editor. This makes
it clearer that it requires compiling the engine to work ("build"
can be understood as exporting a project or building C# solutions
by some).
- Add it to the editor command palette and allow defining a keyboard
shortcut for it, for consistency with other tools.
When zooming out in the 3d node editor view, the negative half
of all 3d axes starts flickering upon moving the camera. To fix this,
the logic surrounding 3d transform "scaled" and "translated" calls has
been altered so as to account for negative distance values.
Fixes#89215.
When renaming or moving global scripts, the following errors can appear:
- Attempt to open script 'xxx' resulted in error 'File not found'.
- Failed loading resource: xxx. Make sure resources have been imported by opening the project in the editor at least once.
- Parser Error: Class 'xxx' hides a global script class.
When deleting scripts, errors appear when opening the 'Create Node Dialog' as the script cache still contains the removed global scripts. The following errors can appear:
- Attempt to open script 'xxx' resulted in error 'File not found'.
- Failed loading resource: xxx. Make sure resources have been imported by opening the project in the editor at least once.
editor/create_dialog.cpp:241 - Condition "scr.is_null()" is true.
All this errors can be fixed by correctly handling the cases. They involves removing the old path and adding the new one (if not deleted) to the ScriptServer. This is somewhat similar if the file is moved or deleted outside Godot and detected by the file watcher, but more specialized for this particular usecase, since we know the old and the new path / correctly know what the user just did.