Vixen
02b45cc4
csharp
public sealed class SceneImporter

Compiles a .vxscene or .vxprefab into the asset a player loads.

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

As a importer

Extensions
.vxscene .vxprefab

Remarks

The build step doc 08 calls SceneCompiler, wired to the pipeline that already exists. The compiler is a pure function from a scene file to a SceneAsset; this is what reads the file, declares what it points at, and writes the result as the chunk an address resolves to. The split is deliberate — the interesting decisions are testable without a project on disk.

An importer rather than a stage of its own, and that is a deviation worth stating. Doc 08 describes compilers as a second pass over what import produced, with its own build graph. This engine's importers already produce chunks in the object database, already have a content-addressed cache keyed on the importer's version and the settings, and already run out of process in parallel — everything the compile pass was specified to add. A second graph would buy one thing this does not have: sharing work between two assets that compile to the same intermediate. Scenes do not, so the seam is not paid for here. The one that will need it is the material/effect pair, where a permutation is genuinely shared.

What it points at is declared before it is compiled. A scene naming a mesh or a material is what makes replacing that mesh recompile the level, and the scan that finds them is the one NativeFormatImporter uses — the same answer for the same question, in one place.

Fields and properties (3)

  • public const string SceneType

    The type a compiled scene's chunk is recorded as.

  • public const string PrefabType

    The type a compiled prefab's chunk is recorded as.

  • public override int Version

Methods (1)

Used by (2)

  • BuiltInImportersVixen.Editor.Assets
  • SceneImporterTestsVixen.Editor.Assets.Tests