Skip to content

Commit e4ec69b

Browse files
committed
Add doc page for orphan resource explorer and engine compilation config editor
1 parent c34eaeb commit e4ec69b

6 files changed

+117
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.. _doc_engine_compilation_config_editor:
2+
3+
Engine Compilation Configuration Editor
4+
=======================================
5+
6+
The "Engine Compilation Configuration Editor" in Godot is a tool that allows developers
7+
to configure and customize the compilation settings for the Godot game engine
8+
while exporting your project as executable.
9+
This includes options for enabling or disabling specific features, text rendering
10+
options, and nodes and classes.
11+
12+
By using this editor, developers can tailor the engine's compilation to suit their
13+
specific project requirements, optimize for size, and manage the inclusion or
14+
exclusion of various engine features.
15+
16+
Usage
17+
=====
18+
19+
To access the tool, navigate to `Project > Tools > Engine Compilation Configuration Editor...`.
20+
You will see the following window:
21+
22+
.. image:: img/engine_compilation_config_editor.webp
23+
24+
Under "Configure Engine Compilation Profile", you will see a comprehensive set of
25+
options that you can enable or disable, grouped under "General Features", "Text
26+
Rendering and Font Options", and "Nodes and Classes".
27+
By default, all features, font rendering options
28+
(except the :ref:`Text Fallback Server <class_TextServerFallback>`),
29+
and classes will be active.
30+
You can click on the items to read their descriptions below.
31+
32+
The settings affect the final size of the exported project; therefore, you may consider
33+
disabling the items that you will not need in your project.
34+
For example, if you develop only 2D games and will never use a 3D-related node in your
35+
project, you may consider disabling `3D Engine` and `3D Physics` from the
36+
`General Feature` section.
37+
38+
In this window, you can create profiles to load later for different projects.
39+
Type a name under `Profile` and save it. This will create a new `.build` file.
40+
41+
If you want to revert your changes back to the original values, you can use
42+
"Reset to Defaults."
43+
44+
You can also use the "Detect From Project" button if you want to quickly select only
45+
the nodes and classes that your project is using, and disable others automatically.
46+
47+
If you still want to have some nodes and resources selected even though you do not
48+
use them, you can force their selection by typing them under "Forced Classes on Detect."
49+
Separate multiple node and class names by a comma (,). For example, writing
50+
``Bone2D, Line2D`` and pressing on "Detect from Project" will keep these two nodes
51+
selected even if the Godot does not detect them in the project's files.
Binary file not shown.
Binary file not shown.
Binary file not shown.

tutorials/editor/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ in other sections where appropriate. For example, the :ref:`animation editor
2424
project_manager
2525
inspector_dock
2626
project_settings
27+
orphan_resource_explorer
28+
engine_compilation_config_editor
2729
default_key_mapping
2830
customizing_editor
2931

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.. _doc_orphan_resource_explorer:
2+
3+
Orphan Resource Explorer
4+
========================
5+
6+
The Orphan Resource Explorer is a tool designed to help optimize the size of your project
7+
by identifying resources that lack explicit ownership or are not being used.
8+
9+
Explicit ownership refers to a resource being utilized as a sub-resource or node within
10+
the project. For instance, a script file is not considered orphaned if it is attached
11+
to a node. Similarly, if a :ref:`Sprite2D <class_Sprite2D>` node uses an image
12+
from the project files as a texture, the image will have explicit ownership.
13+
On the other hand, if a script is created using the FileSystem dock's context
14+
menu but not attached to a node, it will be classified as an orphan resource.
15+
16+
.. warning:: This tool will only search for ownerships set through the interface,
17+
not through the code.
18+
19+
Usage
20+
-----
21+
22+
To access the tool, navigate to `Project > Tools > Orphan Resource Explorer...`.
23+
Depending on the project resources and their usage, the tool will display a window
24+
similar to the one shown below:
25+
26+
.. image:: img/orphan_resource_explorer.webp
27+
28+
The "Resource" column presents the tree structure of your project, listing only
29+
the orphaned files. The "Owns" column indicates the number of files that
30+
a resource uses. If this number is greater than zero, you can click on the
31+
eye icon to view its dependencies.
32+
33+
.. note:: The tool will only search the files using their saved states
34+
on the disk, ignoring any unsaved changes.
35+
36+
You can select and delete resources by marking them via checkbox and using the
37+
"Delete Selected..." button.
38+
39+
It's important to note that deleting a resource that owns items may render those
40+
files orphaned if they are not used elsewhere.
41+
If you delete a file using the FileSystem dock that is dependent on another resource,
42+
a warning will be displayed, showing the list of resources using this file.
43+
44+
If you open the dependencies window, you will see a list of files that the selected
45+
resource uses, including their relative paths.
46+
If you have broken dependencies, these will be listed in red.
47+
48+
.. image:: img/orphan_resource_explorer_dep.webp
49+
50+
Normally, renaming or changing the folders of resources is detected automatically
51+
by the Godot, and the dependencies are updated accordingly.
52+
However, if you made the changes outside of Godot while it is closed, the Godot will
53+
not be able to find them.
54+
In this case, the "Fix Broken" button can help you automatically locate them if you
55+
just changed the folder structure.
56+
57+
58+
Alternatively, in this window, you can click on the folder icon of any item to
59+
replace a file with another.
60+
Note that if the scene is currently open in the workspace, the changes will
61+
take effect only after you close and reopen it.
62+
63+
.. tip:: If you would like to view the owners or dependencies of a file in the project,
64+
you can also right-click on a file in the FileSystem dock and choose "View Dependencies" or "View Owners".

0 commit comments

Comments
 (0)