Prechádzať zdrojové kódy

Added .defunload file documentation (#530)

Mats Gisselson 5 mesiacov pred
rodič
commit
b8bc3b12d0
2 zmenil súbory, kde vykonal 16 pridanie a 1 odobranie
  1. 1 0
      .gitignore
  2. 15 1
      docs/en/manuals/project-defignore.md

+ 1 - 0
.gitignore

@@ -3,5 +3,6 @@ build
 lib/google-cloud-sdk/
 node_modules/
 deps/
+.idea/
 .vscode/
 .lite_project.lua

+ 15 - 1
docs/en/manuals/project-defignore.md

@@ -15,4 +15,18 @@ The files and folders to exclude are defined in a file named `.defignore` in the
 /otherpath
 ```
 
-This will exclude the file `/path/to/file.png` and anything in the path `/otherpath`.
+This will exclude the file `/path/to/file.png` and anything in the path `/otherpath`.
+
+## The `.defunload` file
+
+For certain large projects that contain multiple independent modules, you may want to exclude parts of it from loading to reduce memory usage and load times in the editor. To achieve this, you can list paths to exclude from loading in a `.defunload` file below the project directory.
+
+Simply put, the `.defunload` file allows you to hide parts of the project from the editor without making it a build error to reference the hidden resources.
+
+The patterns in `.defunload` use the same rules as the `.defignore` file. Unloaded Collections and Game Objects will behave as if they were empty when referenced by loaded resources. Other resources that match `.defunload` patterns will be in an unloaded state, and cannot be viewed in the editor. However, if a resource that is loaded depends on them, the unloaded resources and their dependencies are loaded automatically.
+
+For example, if a Sprite depends on images in an Atlas, we have to load the Atlas, or the missing image will be reported as an error. If this happens, a notification will warn the user about the situation and provide information about which unloaded resource was referenced from where.
+
+The editor will prevent the user from adding references to `.defunloaded` resources from loaded resources, so this situation only occurs when resources are read from disk.
+
+Contrary to the `.defignore` file, you need to restart the editor after you edit the `.defunload` file to see the changes take effect.