diff --git a/docs/gdevelop5/all-features/resources-loading/index.md b/docs/gdevelop5/all-features/resources-loading/index.md index aaf804a00d..023cf26550 100644 --- a/docs/gdevelop5/all-features/resources-loading/index.md +++ b/docs/gdevelop5/all-features/resources-loading/index.md @@ -55,6 +55,24 @@ Inside the loading scene, use: ![](loading-screen-events.png) +## Load an object independently + +Usually, all objects are loaded with their scene. When a scene have a lot of resources, you might want to choose when to load and unload objects with heaviest resources. For this, you should select **Preload with action** for the **Resources preloading** property of your objects. + +![](object-preload-property.png) + +You can then use the **Preload object** and **Unload object** actions. + +![](object-preload-action.png) + +The **Preload object** won't stop the game while the object resources are being preloaded. If you try to create the object right away you will likely see pink images because some resources haven't been loaded yet. You can check when it's safe to create the object with the **Object preloaded** condition. + +![](object-preload-events.png) + +!!! note + + Global objects and global object groups are not supported yet. + ## Reference All actions, conditions and expressions are listed in [the scene reference page](/gdevelop5/all-features/scene/reference/). diff --git a/docs/gdevelop5/all-features/resources-loading/object-preload-action.png b/docs/gdevelop5/all-features/resources-loading/object-preload-action.png new file mode 100644 index 0000000000..6e974b2cc2 Binary files /dev/null and b/docs/gdevelop5/all-features/resources-loading/object-preload-action.png differ diff --git a/docs/gdevelop5/all-features/resources-loading/object-preload-events.png b/docs/gdevelop5/all-features/resources-loading/object-preload-events.png new file mode 100644 index 0000000000..df4dc09604 Binary files /dev/null and b/docs/gdevelop5/all-features/resources-loading/object-preload-events.png differ diff --git a/docs/gdevelop5/all-features/resources-loading/object-preload-property.png b/docs/gdevelop5/all-features/resources-loading/object-preload-property.png new file mode 100644 index 0000000000..4a34a946cd Binary files /dev/null and b/docs/gdevelop5/all-features/resources-loading/object-preload-property.png differ