public sealed class ContentMountThe 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 LooseMountPointWhere loose content is mounted, when there is any.
public const string FolderNameThe folder inside the application's output that a content build is copied into.
public const string CatalogFileNameWhat a catalog file is called.
public const string ShaderBundleFileNameWhat the shader bundle is called, beside the catalog.
public const string SceneManifestFileNameWhat the scenes-in-build manifest is called, beside the catalog.
public const string ArtifactFolderNameThe artefact store a loose content directory carries instead of bundles.
public static VirtualPath CacheRootWhere downloaded bundles are kept, under the platform's own cache directory.
public AssetManager? AssetsThe manager over the content that was found, or if there was none.
public VirtualPath RootWhere it was read from.
public bool IsLooseWhether this is loose content rather than what the application shipped with.
public string? ReasonWhy there is no content, when there is none.
public EffectStore? ShadersThe variants this build baked, or if it baked none.
public string? ShaderReasonWhy there are no baked variants, when there are none.
public IReadOnlyList<string> ScenesThe addresses of the scenes this build shipped, first one first, or empty if it shipped none.
public string? SceneReasonWhy there is no scene manifest, when there is none.
public BundleCache? CacheWhere downloaded bundles are kept, or if this build downloads none.
public string? RemoteReasonWhy nothing can be downloaded, when nothing can.
public bool IsUnpackedWhether the chunks come from an artefact store rather than from bundles.
Methods (2)
public static ContentMount Open(VirtualFileSystem files, string? loosePath = null, IContentTransport? transport = null)Finds the application's content and opens it.
public void Dispose()
Used by (6)
- AppBuilderVixen.App.Hosting
- AppServicesVixen.App.Hosting
- VixenApplicationVixen.App.Hosting
- ContentMountTestsVixen.App.Tests
- RemoteContentMountTestsVixen.App.Tests
- StartupSceneTestsVixen.App.Tests