Even if autorun is set to false in Awake, GetRuntimeParent is called and the Parent is set.
This is not convenient in the following situations
// With VContainerSettings.Instance.RootLifetimeScope set.
// Assuming the autorun of the LifetimeScope Prefab for this key's address is set to false
var handle = await Addressables.LoadAssetAsync<LifetimeScope>(key);
var result = handle.Result;
// Internal Awake sets Parent to VContainerSettings.Instance.RootLifetimeScope
var instance = Instantiate(assetLoadHandle.Result);
// I call Build with parentScope as parent at another time, but it doesn't work as intended because Parent is already set
using (LifetimeScope.EnqueueParent(parentScope)) {
instance.Build();
}
I think it would be better if the Parent is determined at Build time, since the Parent resolution process is also performed inside Build, so I think it would be better to remove the GetRuntimeParent that is called in Awake.
VContainer: v1.16.4
Even if autorun is set to false in Awake, GetRuntimeParent is called and the Parent is set. This is not convenient in the following situations
I think it would be better if the Parent is determined at Build time, since the Parent resolution process is also performed inside Build, so I think it would be better to remove the GetRuntimeParent that is called in Awake.