Class RawAssetDependencyCopier
Copies the files a raw asset needs, such as the textures of a model, along with a raw asset copied into a project.
public static class RawAssetDependencyCopier
- Inheritance
-
objectRawAssetDependencyCopier
Methods
CopyDependencies(UFile, UFile, IEnumerable<IAssetImporter>, Logger)
Copies the files that importers read for originalFile to where they read them
relative to copiedFile.
public static IReadOnlyList<UFile> CopyDependencies(UFile originalFile, UFile copiedFile, IEnumerable<IAssetImporter> importers, Logger logger)
Parameters
originalFileUFileThe raw asset that was copied.
copiedFileUFileThe copy.
importersIEnumerable<IAssetImporter>The importers for the raw asset, which report the files it needs.
loggerLoggerThe logger for messages.
Returns
- IReadOnlyList<UFile>
The files that were copied.
Remarks
Files that already exist next to the copy are left alone, and a warning is logged if their contents differ. A file that would go outside the copy's folder or that can't be copied is skipped, and a warning is logged: the importer reports it as missing when the asset is imported.