public static RegistrationBuilder RegisterComponent <TInterface>(this IContainerBuilder builder, TInterface component)
        {
            var registrationBuilder = new ComponentRegistrationBuilder(component).As(typeof(TInterface));

            // Force inject execution
            registrationBuilder.OnAfterBuild((registration, container) => registration.SpawnInstance(container));
            return(builder.Register(registrationBuilder));
        }
        public static ComponentRegistrationBuilder RegisterComponentInHierarchy <T>(this IContainerBuilder builder)
        {
            var lifetimeScope = (LifetimeScope)builder.ApplicationOrigin;
            var scene         = lifetimeScope.gameObject.scene;

            var registrationBuilder = new ComponentRegistrationBuilder(scene, typeof(T));

            // Force inject execution
            registrationBuilder.OnAfterBuild((registration, container) => registration.SpawnInstance(container));
            return(builder.Register(registrationBuilder));
        }