Vixen
02b45cc4
csharp
public sealed class ContentMount

The content build a running application reads from, and where it came from.

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

Remarks

The seam that was missing. Every piece of the content pipeline worked — the catalog, the bundle reader, the asset manager, the build that writes them — and nothing in the boot path opened any of it, so a game could not ask for an address without standing up all three itself. `Vixen.Sdk` has been copying a content build beside the binary since Phase 3 and nothing has ever read it.

Read through the virtual file system, not through a path. The obvious version takes IFileSystemHost.ApplicationDirectory and appends Content, and it is wrong on the two platforms this phase exists for: that property is documented as empty where content is not a directory at all, which is an APK's assets and an iOS bundle. Going through /app means the Android provider's AAssetManager answers the same call the desktop's directory does.

No content is not an error. A sample that draws a triangle, a batch tool, a test — each is an ordinary application with nothing to load, and a host that refused to start without a catalog would make the smallest possible program the hardest one to write. Assets is null and the host says so once at startup.

Fields and properties (18)

  • public static VirtualPath LooseMountPoint

    Where loose content is mounted, when there is any.

  • public const string FolderName

    The folder inside the application's output that a content build is copied into.

  • public const string CatalogFileName

    What a catalog file is called.

  • public const string ShaderBundleFileName

    What the shader bundle is called, beside the catalog.

  • public const string SceneManifestFileName

    What the scenes-in-build manifest is called, beside the catalog.

  • public const string ArtifactFolderName

    The artefact store a loose content directory carries instead of bundles.

  • public static VirtualPath CacheRoot

    Where downloaded bundles are kept, under the platform's own cache directory.

  • public AssetManager? Assets

    The manager over the content that was found, or if there was none.

  • public VirtualPath Root

    Where it was read from.

  • public bool IsLoose

    Whether this is loose content rather than what the application shipped with.

  • public string? Reason

    Why there is no content, when there is none.

  • public EffectStore? Shaders

    The variants this build baked, or if it baked none.

  • public string? ShaderReason

    Why there are no baked variants, when there are none.

  • public IReadOnlyList<string> Scenes

    The addresses of the scenes this build shipped, first one first, or empty if it shipped none.

  • public string? SceneReason

    Why there is no scene manifest, when there is none.

  • public BundleCache? Cache

    Where downloaded bundles are kept, or if this build downloads none.

  • public string? RemoteReason

    Why nothing can be downloaded, when nothing can.

  • public bool IsUnpacked

    Whether the chunks come from an artefact store rather than from bundles.

Methods (2)

Used by (6)

  • AppBuilderVixen.App.Hosting
  • AppServicesVixen.App.Hosting
  • VixenApplicationVixen.App.Hosting
  • ContentMountTestsVixen.App.Tests
  • RemoteContentMountTestsVixen.App.Tests
  • StartupSceneTestsVixen.App.Tests