You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a root lifetimescope in VContainer , which container my NetworkManager object, I have child lifetimescopes that manage scene specific objects injection.
I have registered NetworkManager in root lifetimescope, I receive this error
"VContainerException: Failed to resolve GameEntryPoint : Failed to resolve NetworkManager : No such registration of type: VitalRouter.ICommandPublisher
VContainer.Internal.ReflectionInjector.CreateInstance (VContainer.IObjectResolver resolver, System.Collections.Generic.IReadOnlyList`1[T] parameters) (at"
Here's the content of my root lifetimescope:
using VContainer;
using VContainer.Unity;
public class BootstrapLifetimeScope : LifetimeScope
{
protected override void Configure(IContainerBuilder builder)
{
builder.Register<NetworkManager>(Lifetime.Singleton);
builder.RegisterEntryPoint<GameEntryPoint>();
}
}
And here's my mainmenu scene lifetimescope object:
using UnityEngine;
using VContainer;
using VContainer.Unity;
using VitalRouter.VContainer;
public class MainmenuLifeScope : LifetimeScope
{
[SerializeField]
private ShopItemsCollection _shopItemsCollection;
[SerializeField]
private GameSettings _gameSettings;
protected override void Configure(IContainerBuilder builder)
{
builder.RegisterComponentInHierarchy<MainMenuController>();
builder.RegisterComponentInHierarchy<HeroLook>();
builder.RegisterComponentInHierarchy<CharacterPreview>();
builder.RegisterVitalRouter(router=>{
router.Map<MainMenuEvents>();
});
builder.RegisterInstance(_shopItemsCollection);
builder.RegisterInstance(_gameSettings);
builder.RegisterEntryPoint<GameEntryPoint>();
}
}
The text was updated successfully, but these errors were encountered:
I have a root lifetimescope in VContainer , which container my NetworkManager object, I have child lifetimescopes that manage scene specific objects injection.
I have registered NetworkManager in root lifetimescope, I receive this error
"VContainerException: Failed to resolve GameEntryPoint : Failed to resolve NetworkManager : No such registration of type: VitalRouter.ICommandPublisher
VContainer.Internal.ReflectionInjector.CreateInstance (VContainer.IObjectResolver resolver, System.Collections.Generic.IReadOnlyList`1[T] parameters) (at"
Here's the content of my root lifetimescope:
And here's my mainmenu scene lifetimescope object:
The text was updated successfully, but these errors were encountered: