The Manifest is an asset file that stores the mappings between the different models, view models, views and prefabs.

To create a manifest from the main menu, select Assets > Create > Showzup > Manifest. The manifest will then be automatically selected and displayed in the Inspector window. You must then configure the path within your assets where your view prefabs are located and the URI prefix that will be prepended to each prefab’s relative path, in order to load it at run-time. Finally, press the Build button to regenerate the manifest using those new configurations.

How the Manifest is generated

  • All ViewModel-derived classes are scanned and their base class declaration (... : ViewModel<TModel>) is used to determine the Model > ViewModel mappings.
  • Similarly, all View-derived classes are scanned and their base class declaration (... : View<TViewModel>) is used to determine the ViewModel > View mappings.
  • Finally, all prefabs in the given folder and sub-folders are scanned for any View-derived MonoBehaviours attached to them to determine the View > Prefab mappings.
  • Variants may be associated with each of those mappings (as described in following section Variants, under Variant Mapping).
Tags: