diff --git a/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs b/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs index cce8be3b..9024d2cf 100644 --- a/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs +++ b/VContainer/Assets/VContainer/Runtime/Unity/ContainerBuilderUnityExtensions.cs @@ -208,9 +208,8 @@ public static RegistrationBuilder RegisterSystemFromWorld(this IContainerBuil if (system is null) throw new ArgumentException($"{typeof(T).FullName} is not in the world {world}"); - return builder.RegisterInstance(system) - .As(typeof(ComponentSystemBase)) - .AsSelf(); + return builder.RegisterComponent(system) + .As(typeof(ComponentSystemBase), typeof(T)); } // Use custom world