Table of Contents

Interface IAssetImporter

Namespace
Stride.Core.Assets
Assembly
Stride.Core.Assets.dll

Imports a raw asset into the asset system.

public interface IAssetImporter

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

IEnumerable<Type>

Description

Gets the description of this importer.

string Description { get; }

Property Value

string

The description.

Id

Gets an unique identifier to identify the importer. See remarks.

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.

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.

int Order { get; }

Property Value

int

The order.

RootAssetTypes

Gets the types of asset that are mainly generated by this importer.

IEnumerable<Type> RootAssetTypes { get; }

Property Value

IEnumerable<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

string

Returns a list of supported file extensions handled by this importer.

Methods

GetDefaultParameters(bool)

Gets the default parameters for this importer.

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.

IEnumerable<AssetItem> Import(UFile rawAssetPath, AssetImporterParameters importParameters)

Parameters

rawAssetPath UFile

The path to a raw asset on the disk.

importParameters AssetImporterParameters

The parameters. It is mandatory to call GetDefaultParameters(bool) and pass the parameters instance here

Returns

IEnumerable<AssetItem>

IsSupportingFile(string)

Determines whether this importer is supporting the specified file.

bool IsSupportingFile(string filePath)

Parameters

filePath string

The file path.

Returns

bool

true if this importer is supporting the specified file; otherwise, false.