diff --git a/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs b/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs index b6c9ae1d..9ad3602e 100644 --- a/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs +++ b/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs @@ -106,6 +106,16 @@ public static RegistrationBuilder RegisterEntryPoint( return builder.Register(lifetime).AsImplementedInterfaces(); } + public static RegistrationBuilder RegisterEntryPoint( + this IContainerBuilder builder, + Func implementationConfiguration, + Lifetime lifetime) + { + EntryPointsBuilder.EnsureDispatcherRegistered(builder); + return builder.Register(new FuncRegistrationBuilder(container => implementationConfiguration(container), + typeof(TInterface), lifetime)).AsImplementedInterfaces(); + } + public static void RegisterEntryPointExceptionHandler( this IContainerBuilder builder, Action exceptionHandler)