Run the demo

The demo requires the Unity UI package (com.unity.ugui). To run it, perform the following steps:

  1. Open Assets/Selvage/Demo/Selvage Demo.unity.
  2. Enter Play mode.
  3. Move with WASD or the arrow keys, collect the coins, and avoid the enemies. After a game over, press Space or Enter to play again.
The Selvage demo in Play mode, with the score, the lives, the coins and the enemies

While the demo plays, the Live tab of the Dependencies window displays what each member holds. For more information, refer to Inspect injected members.

Note: The demo requires the Registry Provider, the Attribute Provider, the Asset Provider, and a Scene Provider that looks through the whole scene (its Reach is Scene or All Scenes). If one is missing or turned off, the demo doesn't start, and displays which provider to add. To restore them, go to Edit > Project Settings > Selvage, open the More (⋮) menu at the top right of the page, and select Default. For more information, refer to Reuse your setup in other projects.

Demo scripts

In the demo's scripts, a comment above each member explains where its dependency comes from. Start with Game/Player.cs. The following table lists where the demo uses each feature:

FeatureUsed in
Scene componentsPlayer, Coin, WaveSpawner, GameOverPanel, Hud
[Provide]Score
Provide DefinitionGameSettings, in Provided Assets
RegistrySaveSystem, which adds the player's profile and the save on this device
Custom providerCloudSave, which gives a save from a simulated cloud after a second
OptionalPlayer, Coin
ManualEnemy
EditModeArena
Overwrite, Async, Reactive, Warm, WeakHud

The demo provides only its own types, so it doesn't change what the rest of your project receives. To remove it, delete the Assets/Selvage/Demo folder.

Additional resources