{"action":"created","issue":{"url":"https://api.github.com/repos/modesttree/Zenject/issues/308","repository_url":"https://api.github.com/repos/modesttree/Zenject","labels_url":"https://api.github.com/repos/modesttree/Zenject/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/modesttree/Zenject/issues/308/comments","events_url":"https://api.github.com/repos/modesttree/Zenject/issues/308/events","html_url":"https://github.com/modesttree/Zenject/issues/308","id":244935299,"number":308,"title":"Unable to Bind ZenjectSceneLoader sceneLoader","user":{"login":"NoxMortem","id":6750572,"avatar_url":"https://avatars1.githubusercontent.com/u/6750572?v=4","gravatar_id":"","url":"https://api.github.com/users/NoxMortem","html_url":"https://github.com/NoxMortem","followers_url":"https://api.github.com/users/NoxMortem/followers","following_url":"https://api.github.com/users/NoxMortem/following{/other_user}","gists_url":"https://api.github.com/users/NoxMortem/gists{/gist_id}","starred_url":"https://api.github.com/users/NoxMortem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NoxMortem/subscriptions","organizations_url":"https://api.github.com/users/NoxMortem/orgs","repos_url":"https://api.github.com/users/NoxMortem/repos","events_url":"https://api.github.com/users/NoxMortem/events{/privacy}","received_events_url":"https://api.github.com/users/NoxMortem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-23T20:49:45Z","updated_at":"2017-08-01T16:31:26Z","closed_at":null,"body":"In my ProjectContext I have a Installer creating a LevelController\r\n\r\n```c#\r\nContainer.Bind<LevelController>().AsSingle().NonLazy();\r\n```\r\nI want that LevelController uses `ZenjectSceneLoader`, but I am unable to inject it properly. If I don't bind `ZenjectSceneLoader` it can't resolve the type, which is expected. However, when I try to bind it at the ProjectContextInstaller with\r\n\r\n```c#\r\nContainer.Bind<ZenjectSceneLoader>().AsSingle();\r\n```\r\n\r\nIt says there are multiple matches. When I try to call this line from the Installer of my SceneContext it says it is unable to resolve type `ZenjectSceneLoader` when building LevelController, which is also expected as it can't find a binding for it during the ProjectContext. However, I have no idea how to resolve the dependency.\r\n"},"comment":{"url":"https://api.github.com/repos/modesttree/Zenject/issues/comments/319424541","html_url":"https://github.com/modesttree/Zenject/issues/308#issuecomment-319424541","issue_url":"https://api.github.com/repos/modesttree/Zenject/issues/308","id":319424541,"user":{"login":"Chaser324","id":675439,"avatar_url":"https://avatars1.githubusercontent.com/u/675439?v=4","gravatar_id":"","url":"https://api.github.com/users/Chaser324","html_url":"https://github.com/Chaser324","followers_url":"https://api.github.com/users/Chaser324/followers","following_url":"https://api.github.com/users/Chaser324/following{/other_user}","gists_url":"https://api.github.com/users/Chaser324/gists{/gist_id}","starred_url":"https://api.github.com/users/Chaser324/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chaser324/subscriptions","organizations_url":"https://api.github.com/users/Chaser324/orgs","repos_url":"https://api.github.com/users/Chaser324/repos","events_url":"https://api.github.com/users/Chaser324/events{/privacy}","received_events_url":"https://api.github.com/users/Chaser324/received_events","type":"User","site_admin":false},"created_at":"2017-08-01T16:31:26Z","updated_at":"2017-08-01T16:31:26Z","body":"You shouldn't bind ZenjectSceneLoader yourself. Every SceneContext binds its own instance of ZenjectSceneLoader.\r\n\r\nAlso, ZenjectSceneLoader itself requires a SceneContext be injected into it, so you're not going to be able to inject it into anything you're binding at the ProjectContext level. If you need to do something like this, consider [scene parenting](https://github.com/modesttree/Zenject#scene-parenting-using-contract-names) or scene decorators instead of using ProjectContext."}}
{"actor":{"display_login":"Chaser324"}}