Project root LifetimeScope
You can specify a root LifetimeScope that will be the parent of all LifetimeScopes.
-
- Create your root LifetimeScope prefab
-
- Create
VContainerSettings
- Choose
Assets -> Create -> VContainer -> VContainer Settings
- Create
-
- From your VContainerSettings inspector, set your prefab to the Root Lifetime Scope section.
info
If you create VContainerSettings from this menu, it will be automatically registered in preload assets.
If VContainerSettings does not load, please make sure that VContainerSettings is included in the preload assets in Project Settings -> Player.