Vixen
c7401864
csharp
public sealed class WaterWavesImporter

Imports a .vxwaves — the one asset kind water adds.

Read the guide page for this →

As a importer

Extensions
.vxwaves

Remarks

[35 § D6](../../docs/plan/35-water.md#d6-a-water-body-is-a-spline-and-a-profile-and-there-is-no-new-spline) admits exactly one new asset kind and this is it. A water body is a spline reference and eleven numbers, so it stays in the scene where the merge is; a sea state is shared between every body in a region and between levels, so it does not.

Written as its serialized record rather than carried forward as text — the split TerrainAssetImporter makes between a .vxgrass and a .vxlayer, on the same rule. There is a runtime reader: a zone names this asset and IWaterWaveSource supplies it, so the chunk has to hold the record a game deserialises. A text chunk would be a sea state that quietly never arrives.

⚠ An unsummable spectrum is an error, and that is the one place this is stricter than its terrain sibling. A foliage type with no mesh is an author part-way through and warns; a spectrum whose wavelength range runs backwards has no defensible partial state — Generate throws on it, so what a build that accepted it produces is a zone that renders no waves at all, which reads as the water being broken rather than as the file being wrong.

⚠ What cannot be checked here is whether anything names it. A zone referring to a sea state by a name no asset carries falls back to its inline spectrum and counts into WaterZoneSystem.UnresolvedWaves — a running frame with the wrong sea. The importer sees one file and cannot know which scenes point at it; the count is where that shows.

Fields and properties (2)

  • public const string WavesType

    The alias of the type this writes.

  • 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
  • WaterWavesImporterTestsVixen.Editor.Assets.Tests