public sealed class MaterialImporterCompiles a .vxmat into the material asset a player loads.
As a importer
- Extensions
- .vxmat
Remarks
The step NativeFormatImporter predicted and stopped short of. That importer carried the document forward verbatim and said so: import produces editor-domain objects and a compiler turns them into the runtime chunk, "and those compilers do not exist yet". This is the material's, written on SceneImporter's terms — read the file, declare what it points at, write the result as the chunk an address resolves to.
Why the runtime cannot read the .vxmat itself. Vixen.Rendering deliberately links no YAML parser — the note is in its project file, beside the compositor asset that made the same choice — so a shipping build reads a baked record graph and never sees the text. The parse happens here, once, at build time, on a machine that has a parser.
It compiles the material to find out whether it is one. The artefact is the document, not the compilation, because MaterialCompiler is a pure function the runtime also has — but running it here is what turns "this material has two normal maps" from a wrong image in a level into a message beside the file that caused it. Nothing of the result is kept.
Fields and properties (3)
public const string ExtensionWhat a material is written as.
public const string MaterialTypeThe type a compiled material's chunk is recorded as.
public override int Version
Methods (1)
protected override ValueTask<ImportResult> ImportAsync(ImportContext context, MaterialImportSettings settings, CancellationToken cancellationToken)Imports one asset.
Used by (2)
- BuiltInImportersVixen.Editor.Assets
- MaterialImporterTestsVixen.Editor.Assets.Tests