Extenject icon indicating copy to clipboard operation
Extenject copied to clipboard

Unable to inject into MonoBehaviour from SubContainer

Open JChudinov opened this issue 2 years ago • 0 comments

Describe the bug While trying to bind MonoBehaviour in SubContainer (FromSubContainerResolve ByMethod) I cant inject anything (both field and method injection failed).

To Reproduce

  1. Create Installer and SubContainer, register in project/scene context
  2. Create MonoBehaviour class and bind it in SubContainer as FromInstance
  3. Bind any other stuff in SubContainer and try to inject it it MonoBehaviour class.
  4. Validate and play

Expected behavior Scene validation succeeded

Extenject and Unity info (please complete the following information):

  • Zenject version: reproduced on 9.2.0, 9.2.1 and 9.3.0
  • Unity version: 2020.3.15f2
  • Project's scripting backend IL2CPP

Gist with files to reproduce https://gist.github.com/JChudinov/cc4867ef1aef3fb7597d3831a66bb202

JChudinov avatar Oct 14 '22 09:10 JChudinov