VContainerSettings.Instance.RootLifetimeScope.Container is null
Description: Created a custom AppContext (inherits LifetimeScope) and assigned it as Root in a VContainerSettings asset. In a regular MonoBehaviour OnClick event I check: VContainerSettings.Instance.RootLifetimeScope.Container == null It is always true. I expected the root container to be built by then. This only happens in 1.17.0 version but not in 1.13.2.
Environment:
Unity: 6000.0.28f1c1 VContainer: 1.17.0 Platform: Windows Editor Mode Scripting Backend: Mono
Steps To Reproduce:
Create AppContext: LifetimeScope, place it in the scene (enabled).
Create a VContainerSettings asset, assign the AppContext as Root.
Add a MonoBehaviour (TestBehaviour) to another GameObject.
Enter Play Mode.
Observe console logs: container remains null in when I click the GameObject.
Also has strange behavior with RootLifetimeScope at 1.17.0, can`t find during runtime sometimes if select root as parent in LifetimeScope.
It seems you should remove the existing AppContext instance from the scene and instead use one that is instantiated at runtime.
Before https://github.com/hadashiA/VContainer/pull/627, VContainerSettings.Instance.RootLifetimeScope was used directly as an instance.
But now, it is just a prefab. (and runtime instance is instantiated)
The commit is just after 1.13.2.