Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IStartable.Start() が例外で繰り返し実行される / Unexpected Repeated Execution of IStartable.Start() #729

Open
tobyapi opened this issue Dec 9, 2024 · 0 comments

Comments

@tobyapi
Copy link

tobyapi commented Dec 9, 2024

再現環境:

  • Unity 2022.3.43f1
  • VContainer v1.16.6

以下のコードを適当な GameObject にアタッチして実行すると、IStartable.Start() が何度も実行されていました。この挙動が想定通りかお伺いしたいです。

using System;
using VContainer;
using VContainer.Unity;

public class TestLifetimeScope : LifetimeScope
{
    protected override void Configure(IContainerBuilder builder)
    {
        builder.Register<TestClass>(Lifetime.Singleton).AsImplementedInterfaces();
    }
}

public class TestClass : IStartable
{
    void IStartable.Start()
    {
        throw new Exception();
    }
}

13


When the following code is attached to an appropriate GameObject and executed, IStartable.Start() was being called repeatedly. I would like to ask if this behavior is as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant