Vixen
02b45cc4
csharp
public static class BundleFile

What a bundle's file is called, on both sides of a build.

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

Remarks

⚠ Here, in the assembly that owns the catalog, because a build writes these names and a runtime reads them. It was written down twice and the two disagreed: ContentBuilder named a bundle after its group and its content hash — which is BundleNaming.FilenameHash, the default — and LocalBundleSource looked for the group's name alone. Every local bundle a real build produced was therefore unopenable, and the failure arrived as BundleUnavailableException on the first address a game asked for, having passed the catalog, the doctor and the determinism gate on the way.

⚠ Both forms are derivable from the catalog, which is why the naming policy does not need to be in it. A CatalogBundle carries the name and the hash, and a group's BundleNaming chooses between exactly these two spellings of them — so a reader can name both candidates rather than the catalog having to record which was chosen.

Fields and properties (2)

  • public const string Extension

    What a bundle file's extension is.

  • public const int HashPrefixLength

    How much of the content hash a hashed name carries. Sixteen hex characters, which is enough that two bundles colliding is not a thing that happens, and short enough that a directory listing is still readable.

Methods (2)

  • public static string Named(string bundle)

    The name of a bundle whose group names its files after itself.

  • public static string Hashed(string bundle, ObjectId hash)

    The name of a bundle whose group appends the content hash.

Used by (3)

  • LocalBundleSourceVixen.Assets
  • ContentBuilderVixen.Editor.Assets
  • DoctorRunnerVixen.Cli