Vixen
02b45cc4
csharp
public sealed class NativeFormatImporter

Imports an asset Vixen itself authored: a material, a scene, a prefab, a group.

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

As a importer

Extensions
.vxgroup .vxinput .vxasset

Remarks

Its real job is the dependency graph, not the conversion. There is nothing to convert — the file is already in the engine's own format, which is the whole point of [doc 08](../../docs/plan/08-asset-pipeline-and-addressables.md)'s YAML dialect. What is not already known is what the file points at, and that is what makes a material re-import when the texture it names is replaced. So this walks the document, finds every vx: scalar, and declares each one.

A reference that does not parse fails the import. A scalar beginning vx: was meant to be a reference by whoever wrote it; if the GUID after it is malformed, the alternatives are failing here — naming the file and the text — or shipping an asset whose pointer resolves to nothing on a player's machine. Anything that does not begin with the prefix is left alone, because a string field holding arbitrary text is ordinary.

What it writes is the document, and that is a deliberate stopping point. Doc 08 splits import from compile: import produces editor-domain objects, and the compiler turns them into the runtime chunks a player loads. Emitting a half-resolved binary here would put the compiler's decisions inside the importer, where the artefact cache key cannot see them; carrying the document forward keeps the seam where the plan puts it.

.vxscene, .vxprefab, .vxmat, .vxvfx and now .vxanim are no longer among them, and each took the same shape: SceneImporter, MaterialImporter and AnimationClipImporter read the same document, declare the same references through the same scan, and write a compiled asset rather than the text. What is left here are the formats whose compiler genuinely has nothing to do — a group, an input map — and nothing whose compiler is still owed.

Fields and properties (1)

  • public override int Version

    Its 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".

Methods (1)

Used by (2)

  • BuiltInImportersVixen.Editor.Assets
  • NativeFormatImporterTestsVixen.Editor.Assets.Tests