Describe the bug
Method with attribute [Inject] is called twice when a class binded as NonLazy in ProjectInstaller. Only on Android.
Binding happens like this:
Bind class having method with attribute [Inject] in ProjectInstaller as specified above.
Create a SceneContext on the scene
Build this scene as APK file on Android device and run application
Expected behavior
Method with attribute [Inject] called one time when object is instantiating.
Actual behavior
Method with attribute [Inject] called twice times when object is instantiating.
Extenject and Unity info (please complete the following information):
Zenject version: 9.2.0
Unity version: 2020.3.14f1
Project's scripting backend: IL2CPP
Additional context
Android version on target device: 8.0.0
Target device: Honor 9 (STF-L09)
If change NonLazy binding to Lazy then method with attribute [Inject] will be called one time.
Logs with stacktrace: Zenject non-lazy bug.txt
Describe the bug Method with attribute [Inject] is called twice when a class binded as NonLazy in ProjectInstaller. Only on Android. Binding happens like this:
Container .Bind< ClassName >() .ToSelf() .FromNewComponentOnNewGameObject() .AsSingle() .NonLazy();
To Reproduce Steps to reproduce the behavior:
Expected behavior Method with attribute [Inject] called one time when object is instantiating.
Actual behavior Method with attribute [Inject] called twice times when object is instantiating.
Extenject and Unity info (please complete the following information):
Additional context Android version on target device: 8.0.0 Target device: Honor 9 (STF-L09) If change NonLazy binding to Lazy then method with attribute [Inject] will be called one time. Logs with stacktrace: Zenject non-lazy bug.txt