Which should take precedence, EnqueueParent or Component's Parent?
using (LifetimeScope.EnqueueParent(parentLifeTimeScope))
{
// instantiate LifeTimeScope instance
}
If Parent is set on the Prefab side, using LifetimeScope.EnqueueParent will not overwrite it, and the original Parent will remain set.
The parentReference is returned before the overrideParent as the priority of the Parent returned by GetRuntimeParent().
https://github.com/hadashiA/VContainer/blob/master/VContainer/Assets/VContainer/Runtime/Unity/LifetimeScope.cs#L270-L288
I thought this was counter-intuitive as EnqueueParent behavior, but is it as expected?
@adarapata Hi,
It seems you have a point.
In the past, EnqueueParent's priority is high.
The problem was reported in #245. When there are multiple LifetimeScope parent-child relationships in the same scene, high-priority-EnqueueParent breaks them.
We should find a way to solve both of these problems.