Vixen
02b45cc4
csharp
public sealed class ContentUpdate

Step 2 of the boot sequence: find out whether the server has newer content.

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

Remarks

Doc 08 lays out four steps — load the shipped catalog, check for a remote one and merge it over, resolve addresses through the result, fetch bundles on demand. This is the second, and it is the one that makes a content update possible without shipping a build.

The hash file is checked first because it is tiny. A catalog for a real game is hundreds of kilobytes and almost always unchanged; a 32-byte file next to it turns the common case — start the game, nothing is new — into one request the size of a packet. It also gives the downloaded catalog something to be checked against, which a catalog fetched on its own does not have.

Being offline is an outcome, not an error. A game whose CDN is unreachable has to start anyway, on the newest catalog it has: the previously downloaded one if there is one, and the shipped one if not. Throwing would turn a flaky connection into a game that will not launch. It is still reported, because the same silence means a misconfigured URL and nobody should have to guess which.

An update can replace an address but not remove one. That is MergedWith's rule and the reason is there: the shipped application still has the bundle on the device, and a runtime that forgot the address would refuse to load something it is sitting on.

Fields and properties (5)

  • public VirtualPath CacheRoot

    Where the downloaded catalog and its hash are kept.

  • public string CatalogUrl

    Where the catalog is served from, or empty if no remote content is configured.

  • public string HashUrl

    Where the hash naming that catalog is served from.

  • public VirtualPath CachedCatalogPath

    Where the downloaded catalog is cached.

  • public VirtualPath CachedHashPath

    Where the hash of the downloaded catalog is cached.

Methods (3)

Used by (3)

  • ProgramAddressablesRemote
  • ContentUpdateTestsVixen.Assets.Tests
  • UpdateWorldVixen.Assets.Tests