Class AssetImporterBase
public abstract class AssetImporterBase : IAssetImporter
- Inheritance
-
AssetImporterBase
- Implements
- Derived
Properties
AdditionalAssetTypes
Gets the additional types of asset that can be generated by this importer in complement of the root assets
public virtual IEnumerable<Type> AdditionalAssetTypes { get; }
Property Value
Description
Gets the description of this importer.
public abstract string Description { get; }
Property Value
- string
The description.
Id
Gets an unique identifier to identify the importer. See remarks.
public abstract Guid Id { get; }
Property Value
- Guid
The identifier.
Remarks
This identifier is used to recover the importer used for a particular asset. This Guid must be unique and stored statically in the definition of an importer. It is used to reimport an existing asset with the same importer.
Name
Gets the name of this importer.
public virtual string Name { get; }
Property Value
- string
The name.
Order
Gets the order of precedence between the importers, so that an importer can override another one.
public int Order { get; protected set; }
Property Value
- int
The order.
RootAssetTypes
Gets the types of asset that are mainly generated by this importer.
public abstract IEnumerable<Type> RootAssetTypes { get; }
Property Value
SupportedFileExtensions
Gets the supported file extensions (separated by ',' for multiple extensions) by this importer. This is used for display purpose only. The method IsSupportingFile(string) is used for matching extensions.
public abstract string SupportedFileExtensions { get; }
Property Value
- string
Returns a list of supported file extensions handled by this importer.
Methods
GetDefaultParameters(bool)
Gets the default parameters for this importer.
public AssetImporterParameters GetDefaultParameters(bool isForReImport)
Parameters
isForReImport
bool
Returns
- AssetImporterParameters
The supported types.
Import(UFile, AssetImporterParameters)
Imports a raw assets from the specified path into the specified package.
public abstract IEnumerable<AssetItem> Import(UFile rawAssetPath, AssetImporterParameters importParameters)
Parameters
rawAssetPath
UFileThe path to a raw asset on the disk.
importParameters
AssetImporterParametersThe parameters. It is mandatory to call GetDefaultParameters(bool) and pass the parameters instance here
Returns
IsSupportingFile(string)
Determines whether this importer is supporting the specified file.
public virtual bool IsSupportingFile(string filePath)
Parameters
filePath
stringThe file path.
Returns
- bool
true
if this importer is supporting the specified file; otherwise,false
.