IN THIS ARTICLE
The Asset Cache stores the runtime optimized product assets for each target platform, information about the process jobs that generated the product assets, and additional information about the assets such as product dependencies. The Asset Cache is located in the
Cache directory under your project’s root directory.
Don’t add the Asset Cache to source control. Because the Asset Cache is continuously updated through automatic processes, it’s difficult to manage within source control. Using an Asset Cache from source control can also cause issues with asset timestamps that are used to determine whether assets need to be reprocessed.
Don’t edit product assets directly. If Asset Processor reprocesses the source asset, any changes made to the product asset are overwritten. To make changes to an asset, edit an upstream file, the source asset file, or the
There are three parts to the Asset Cache: the Asset Database, the Asset Catalog, and the Asset Cache itself.
The Asset Database is only used by Asset Processor. The Asset Database is a development time database containing details about assets, jobs, Asset Builders, and scan directories. It contains all the information Asset Processor requires to determine which assets have been processed, and which assets need to be processed.
With the information in the Asset Database, Asset Processor can be closed when it has not finished processing all assets. Next time it is launched, the Asset Processor will use this information to figure out what assets it has already processed.
The Asset Catalog is a runtime catalog of product assets and product dependencies. The Asset Catalog contains a subset of information from the Asset Database; the information about assets required at runtime. Asset Browser uses the Asset Catalog to find the runtime product assets on disk that you request for your projects.
The information in the Asset Catalog XML file in the cache is not the same information that is available in the runtime project. During development, O3DE Editor and game launchers use the
assetcatalog.xml file for tracking assets. In bundled release builds, the only assets available in the catalog are those that are specifically mounted within
asset bundles. Each bundle contains a Delta Catalog, which is a subset of the Asset Catalog, containing information about the assets within the asset bundle. As asset bundles are mounted, the Delta Catalog XML file is loaded, and the in-memory Asset Catalog is expanded to contain the information from the Delta Catalog.
The Asset Cache contains the Asset Database, the Asset Catalog, and the product assets generated by Asset Builders.
The Asset Cache contains versions of the product asset for the host platform, as well as versions for each target platform. For example, when you create a project for Windows and mobile platforms, the cache contains separate versions of the Asset Cache for Windows and each mobile platform. If you are developing the project on Windows and deploying on Windows, the same product assets are used for the host and target platforms.
Cache directory of your project, there are subdirectories for each platform supported by your project. In the platform directories, there are directories that correspond to every scan directory in which Asset Processor found source assets. The scan directories contain the product assets generated by Asset processor.
Asset Processor assumes it is the only process that makes changes to the Asset Cache. If you modify or delete files in the Asset Cache, including deleting product asset files while Asset Processor is not running, the changes might not be noticed by Asset Processor.
The Asset Cache is used during the development phase, and by default the Editor and game launchers load assets from the asset cache. The default behavior for release builds is to use bundled assets.
Note:If you ever encounter an issue with the Asset Cache that you can’t resolve, your project’s
Cachedirectory can be deleted. Asset Processor automatically rescans the directories, analyzes the source assets it finds, and runs new process jobs, rebuilding the entire Asset Cache.