Zenject icon indicating copy to clipboard operation
Zenject copied to clipboard

Failed to remove SceneContext from SceneContextRegistry

Open develax opened this issue 3 years ago • 1 comments

Describe the bug I'm getting this warning message in the console for no significant reason: "Failed to remove SceneContext from SceneContextRegistry"

To Reproduce Add this static class to a project to unload a scene in case when the projected is started from the wrong scene:

public static class StartSceneController 
{
    [RuntimeInitializeOnLoadMethod]
    private static void onAppLoaded()
    {
        Scene scene = SceneManager.GetActiveScene();

        if (scene.buildIndex != 0)
                SceneManager.LoadScene(0);
    }
}

Expected behavior No warnings in the console.

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

  • Zenject version: 9.2.0
  • Unity version: 2021.3.6f1
  • Project's scripting backend [e.g. Mono/IL2CPP]: mono

develax avatar Aug 08 '22 19:08 develax

I shamelessly copied this over to the Extenject repo

bilalakil avatar Nov 11 '22 06:11 bilalakil