Vixen
02b45cc4
csharp
public sealed class ImportPipeline

Turns source files into artefacts, and skips the ones that have not changed.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The order is fixed and each step exists for a reason: read the sidecar, decide which importer claims the file, resolve the per-target overrides, hash the source and the resolved settings, compute the key, and only then decide whether to run anything.

Artefacts go into the content-addressed object database, so two assets that import to identical bytes are one chunk — a hundred prefabs sharing one material cost one material — and an artefact's id is a checksum of itself.

The sidecar is written back through the node tree. An import records its sourceHash and the sub-assets it found, and the byte-fidelity emitter means every other line of the file — the settings, the addressable block, the comments — comes back out exactly as it went in. That is what makes an import a diff of the two lines it changed rather than of the whole file.

Fields and properties (4)

  • public ImportCache Cache

    What the last import of each asset produced.

  • public string Target

    Which build target to import for — Windows, Android/Vulkan.

  • public bool EnforceDeclaredReads

    Whether an importer that reads an undeclared file fails.

  • public IImportExecutor Executor

    Where importers actually run.

Methods (3)

  • public ImportPipeline(AssetDatabase database, ImporterRegistry importers, ObjectDatabase artifacts, IFileProvider files, ImportCache? cache = null)

    Sets up a pipeline over a project.

  • public ValueTask<IReadOnlyList<ImportOutcome>> ImportAllAsync(CancellationToken cancellationToken = default(CancellationToken))

    Imports everything in the project that needs it.

  • public ValueTask<ImportOutcome> ImportAsync(AssetEntry entry, CancellationToken cancellationToken = default(CancellationToken))

    Imports one asset, unless nothing about it has changed.

Used by (2)

  • ContentPipelineVixen.Editor.Assets
  • ImportPipelineTestsVixen.Editor.Assets.Tests