Skip to main content

Export type

info

This section describes high-level export strategies aimed at a broad selection of resources. For fine-grained control over exported assets, please refer to Assets includes & excludes section.

Motivation

Unity projects come in all shapes and forms: some are built from scratch recently using latest Unity versions, some come with artifacts from the multiple years in which developers worked on them. One of the diverse approaches to building projects in Unity revolves around asset management.

While it's considered good practice to have strong links between scenes or scriptable objects and secondary assets, like prefabs, textures and sounds, many people still resort to good old Resources.Load API to dynamically load some content into the game.

Playworks Plugin's default export strategy

By default Unity Playworks Plugin detects all assets in use by the scenes you have selected in the plugin window, this includes: all prefabs, textures, animations and other resources found in the project.

Whilst this strategy often produces undesirably big builds, especially with games which have a lot of assets, it is a preferable starting point because it helps avoid issues caused by misconfiguration and eases debugging of first exports.

Export types in Luna

On the other hand, we by default do not include the "Resources" and "Streaming Assets" Special Unity folders. If you are making use of either of these respective special folders in your playable, you can tick these options for inclusion:

troubleshooting-plugin-ui-export-type

info

Unity Playworks Plugin always makes best effort to keep things valid, thus if an asset gets into an exported set in any way (by being on a scene or residing in a prefab), it is going to be exported along with any explicit dependencies it uses.

That is, if a scene is using a prefab, developers don't have to explicitly include this prefab into an export - plugin will discover this dependency and export it automatically.