I want to avoid including assets that I don't have references to in the package

<br>Hello everyone

Thank you for your help.

I’d like to ask for your advice.

I want to avoid including assets that have become garbage and have no references, such as assets used in Debug, or assets that were used in the early stages of development but are no longer used, when packaging.

It seems like I should add a process to do this somewhere in UAssetManager, but I don’t know where it would be appropriate to do this. If anyone knows, could you tell me?

Thank you in advance.

Hello!

The default of the cooking process is to include all the project’s asset. You can change this by specifying a “list of maps to include in a packaged build” in the the project settings. This will have the cooking process to only consider the assets in the specified levels and the full chain of dependencies. Unreferenced assets should not be part of the project anymore unless they are under an “Additional Asset Directories to Cook” (in the settings).

Regards

Assets that are not referenced by the cooked content will never be part of a package.

There are a couple of ways that you can detect\prevent referencing assets:

  • Project Setting\Packaging\“Directories to never cook”: Manage a list of folders that will be excluded when cooking. An error will fail the packaging If a cooked assets references an asset in that folder.
  • AssetReferenceRestrictions: This plugin allows to configure " Asset Referencing Policy" in the project settings

Regards

Thank you for your reply.

I will change the project settings to accommodate this.

What we want to do is as follows, but is this possible?

- We don’t want to include assets that have no references to levels or other BPs in the package

(we don’t want to accidentally include unnecessary assets created during development in the package)

- Is it possible to exclude unreferenced assets on a folder-by-folder basis?

(We want to reduce the mistake of including garbage debug data in the package)