IAssetImporter Interface
Namespace: Stride.Core.AssetsAssembly: Stride.Core.Assets.dll
Imports a raw asset into the asset system.
public interface IAssetImporter
Name | Description | |
---|---|---|
Properties | ||
AdditionalAssetTypes | Gets the additional types of asset that can be generated by this importer in complement of the root assets |
|
Description | Gets the description of this importer. |
|
Id | Gets an unique identifier to identify the importer. See remarks. |
|
Name | Gets the name of this importer. |
|
Order | Gets the order of precedence between the importers, so that an importer can override another one. |
|
RootAssetTypes | Gets the types of asset that are mainly generated by this importer. |
|
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. |
|
Methods | ||
GetDefaultParameters(Boolean) | Gets the default parameters for this importer. |
|
Import(UFile, AssetImporterParameters) | Imports a raw assets from the specified path into the specified package. |
|
IsSupportingFile(String) | Determines whether this importer is supporting the specified file. |
Properties
AdditionalAssetTypes
Gets the additional types of asset that can be generated by this importer in complement of the root assets
IEnumerable<Type> AdditionalAssetTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Type> |
Description
Gets the description of this importer.
string Description { get; }
Property Value
Type | Description |
---|---|
System.String | The description. |
Id
Gets an unique identifier to identify the importer. See remarks.
Guid Id { get; }
Property Value
Type | Description |
---|---|
System.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.
string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Order
Gets the order of precedence between the importers, so that an importer can override another one.
int Order { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The order. |
RootAssetTypes
Gets the types of asset that are mainly generated by this importer.
IEnumerable<Type> RootAssetTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Type> |
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.
string SupportedFileExtensions { get; }
Property Value
Type | Description |
---|---|
System.String | Returns a list of supported file extensions handled by this importer. |
Methods
GetDefaultParameters(Boolean)
Gets the default parameters for this importer.
AssetImporterParameters GetDefaultParameters(bool isForReImport)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isForReImport |
Returns
Type | Description |
---|---|
AssetImporterParameters | The supported types. |
Import(UFile, AssetImporterParameters)
Imports a raw assets from the specified path into the specified package.
IEnumerable<AssetItem> Import(UFile rawAssetPath, AssetImporterParameters importParameters)
Parameters
Type | Name | Description |
---|---|---|
Stride.Core.IO.UFile | rawAssetPath | The path to a raw asset on the disk. |
AssetImporterParameters | importParameters | The parameters. It is mandatory to call GetDefaultParameters(Boolean) and pass the parameters instance here |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AssetItem> |
IsSupportingFile(String)
Determines whether this importer is supporting the specified file.
bool IsSupportingFile(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file path. |
Returns
Type | Description |
---|---|
System.Boolean |
|