Provide dependencies
Provide components, instances of your classes, assets and objects your code creates.
Each provider in the provider list gives dependencies from one source. By default, the list holds the four providers that ship with Selvage.
Every object you provide has a lifetime, which decides whether members share one object, each receive their own, or borrow one from a pool.
Topics
| Topic | Description |
|---|---|
| Provide scene components | Provide components from the same GameObject or from the loaded scenes. |
| Provide your own classes | Provide instances of plain C# classes marked [Provide]. |
| Provide assets | Provide ScriptableObjects, prefabs and other assets with a Provide Definition. |
| Provide objects your code creates | Provide objects your code creates, with the registry or a local block. |
| Choose between several candidates | Decide which member receives which object when several could fit. |
| Lifetimes | Decide whether members share an object, each receive their own, or borrow one from a pool, and how long a shared object lasts. |