public abstract class AssetImporter<TSettings> where TSettings : class, IImportSettings, new()An importer for one settings type.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The importer is generic and the context is not, which is a deviation from [08](../../docs/plan/08-asset-pipeline-and-addressables.md)'s ImportContext<TSettings> and is not a simplification. Building an ImportContext<T> for a settings type the pipeline only knows at run time needs MakeGenericType, which NativeAOT does not have. The importer's own type parameter costs nothing — it is closed at the class TextureImporter : AssetImporter<TextureImportSettings> declaration — so the settings arrive as a typed parameter and everything stays statically bound.
The name comes from the settings type's contract alias, so one attribute defines the .meta tag, the settings type, the serializer and the cache key with nothing to keep in sync.
Fields and properties (4)
public abstract int VersionIts own version. Bumping it invalidates every artefact it has ever produced, which is the whole mechanism for "I fixed the mip filter, re-import everything".
public Type SettingsTypeWhat its settings are.
public string NameWhat it is called in a .meta file and in the cache key — its settings type's [DataContract] name.
public IReadOnlyList<string> ExtensionsWhich extensions it claims.
Methods (3)
public IImportSettings CreateSettings()Makes a settings object with every default in place.
public ValueTask<ImportResult> ImportAsync(ImportContext context, CancellationToken cancellationToken = default(CancellationToken))Imports one asset.
protected abstract ValueTask<ImportResult> ImportAsync(ImportContext context, TSettings settings, CancellationToken cancellationToken)Imports one asset.
Used by (42, showing 40)
- AnimationClipImporterVixen.Editor.Assets
- AnimationClipImporterTestsVixen.Editor.Assets.Tests
- AudioImporterVixen.Editor.Assets
- AudioImporterTestsVixen.Editor.Assets.Tests
- ClipMetadataTestsVixen.Editor.Assets.Tests
- CompositorImporterVixen.Editor.Assets
- ConstraintAuthoringImporterTestsVixen.Editor.Assets.Tests
- ConstraintTemplateImporterVixen.Editor.Assets
- CubeLutImporterVixen.Editor.Assets
- FolderImporterVixen.Editor.Assets
- HarnessPlanImporterVixen.Editor.Assets
- HarnessPlanImporterTestsVixen.Editor.Assets.Tests
- HeightmapImporterVixen.Editor.Assets
- ImportedGeometryLoadsTestsVixen.Editor.Assets.Tests
- ImporterTestsVixen.Editor.Assets.Tests
- MaterialImporterVixen.Editor.Assets
- MaterialImporterTestsVixen.Editor.Assets.Tests
- ModelImporterVixen.Editor.Assets
- ModelImporterTestsVixen.Editor.Assets.Tests
- MoveSetImporterVixen.Editor.Assets
- MoveSetImporterTestsVixen.Editor.Assets.Tests
- NativeFormatImporterVixen.Editor.Assets
- NativeFormatImporterTestsVixen.Editor.Assets.Tests
- NavMeshImporterVixen.Editor.Assets
- NavMeshImporterTestsVixen.Editor.Assets.Tests
- PaletteImporterVixen.Editor.Assets.Tests
- PriorityLadderImporterVixen.Editor.Assets
- ProxyShapeImporterTestsVixen.Editor.Assets.Tests
- ProxyShapeSetImporterVixen.Editor.Assets
- RawImporterVixen.Editor.Assets
- RivalPaletteImporterVixen.Editor.Assets.Tests
- RivalTextureImporterVixen.Editor.Assets.Tests
- SceneImporterVixen.Editor.Assets
- SceneImporterTestsVixen.Editor.Assets.Tests
- ShapeVocabularyImporterVixen.Editor.Assets
- TerrainAssetImporterVixen.Editor.Assets
- TerrainAssetImporterTestsVixen.Editor.Assets.Tests
- TextureImporterVixen.Editor.Assets
- TextureImporterTestsVixen.Editor.Assets.Tests
- VfxImporterVixen.Editor.Assets