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

Exception: Multiple instances of SignalBus found #27

Open
pilzinho opened this issue Sep 2, 2019 · 1 comment
Open

Exception: Multiple instances of SignalBus found #27

pilzinho opened this issue Sep 2, 2019 · 1 comment

Comments

@pilzinho
Copy link

pilzinho commented Sep 2, 2019

Hello!

I posted the issue we have also in the Zenject repo (ssannandeji#656) but it can be reproduced with Extenject 8.0.1 as well.
When loading 3 scenes each with a SceneContext and parented using Contract Names and the SignalBus installed in the first scene we get the following exception when the third scene is loaded:

ZenjectException: Found multiple matches when only one was expected for type 'SignalBus' while building object with type 'SignalBus'. Object graph:
SceneKernel
DisposableManager
SignalBus

The second and third scene each install a component which gets the SignalBus injected.
I have created a simple project to reproduce the error. I'm on Windows 10 with Unity 2018.4.3f1 with Extenject 8.0.1.
To run the project open it in Unity and add 'Zenject-WithSampleGames@v8.0.1.unitypackage
' (the GameSignalsInstaller from the sample game is used in the test project). The main scene is called 'SignalBusIssueScene1' located in the folder 'SignalBusIssue'.
I also attached the output log from the build so you can see the whole stack trace of the exception.
ZenjectSignalBusIssueProject.zip
output_log.txt

@rumyancevpavel
Copy link

Hope this issue will be resolved

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

2 participants