Skip to content

Interface IAssetImporter

Namespace: Apogee.Content.Import
Assembly: Apogee.Content.dll

One kind of asset can turn into an artifact: a name, the extensions it takes, a fingerprint (part of the key, so changing what it writes imports again) and a function from source to artifact. Importers do not touch the index, the keys or the files: they read through , which records what they read.

public interface IAssetImporter

Properties

Extensions

The extensions it takes, with the dot, in lower case.

IReadOnlyList<string> Extensions { get; }

Property Value

IReadOnlyList<string>

Fingerprint

Everything that changes what it writes and is not in the asset or its .import.xml: its own version, the version and the options of the tools it calls.

string Fingerprint { get; }

Property Value

string

Name

Names the importer in the key.

string Name { get; }

Property Value

string

Methods

Import(ImportContext)

The artifact of the asset, or null when the asset is not one (a shader module that only other shaders import): it then has no entry in the index.

ImportResult? Import(ImportContext context)

Parameters

context ImportContext

Returns

ImportResult?

Exceptions

ContentException

The asset cannot be imported.