From 3400bb7024d54ebca48769cea8aa867105841295 Mon Sep 17 00:00:00 2001 From: hadashi Date: Mon, 3 May 2021 16:50:12 +0900 Subject: [PATCH] Fix ecs behaviour --- .../Runtime/Unity/ContainerBuilderUnityExtensions.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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