KeyNotFoundException: The given key '89302010' was not present in the dictionary. Network Scene Manager
See original GitHub issueDescription
When my client joins a host the scene loads but the gives the error KeyNotFoundException: The given key '89302010' was not present in the dictionary.
This happened when I updated from 1.0.2
to 1.1.0
.
Reproduce Steps
Have a client join a host who is on a different scene than the client
Actual Outcome
Scene was loaded. No network objects spawn. No RPCs get received.
Expected Outcome
Scene should load and network objects should sync.
Environment
- OS: Windows
- Unity Version: 2021.3.6f1
- Netcode Version: 1.1.0
Additional Context
Trace:
KeyNotFoundException: The given key '89302010' was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <e40e5a8f982c4b618a930d29f9bd091c>:0)
Unity.Netcode.NetworkSceneManager.GetSceneRelativeInSceneNetworkObject (System.UInt32 globalObjectIdHash, System.Nullable`1[T] networkSceneHandle) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/SceneManagement/NetworkSceneManager.cs:755)
Unity.Netcode.NetworkSpawnManager.CreateLocalNetworkObject (Unity.Netcode.NetworkObject+SceneObject sceneObject) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Spawning/NetworkSpawnManager.cs:385)
Unity.Netcode.NetworkObject.AddSceneObject (Unity.Netcode.NetworkObject+SceneObject& sceneObject, Unity.Netcode.FastBufferReader variableData, Unity.Netcode.NetworkManager networkManager) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkObject.cs:1287)
Unity.Netcode.SceneEventData.SynchronizeSceneNetworkObjects (Unity.Netcode.NetworkManager networkManager) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/SceneManagement/SceneEventData.cs:864)
Unity.Netcode.NetworkSceneManager.HandleClientSceneEvent (System.UInt32 sceneEventId) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/SceneManagement/NetworkSceneManager.cs:1781)
Unity.Netcode.NetworkSceneManager.ClientLoadedSynchronization (System.UInt32 sceneEventId) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/SceneManagement/NetworkSceneManager.cs:1747)
Unity.Netcode.SceneEventProgress.<SetAsyncOperation>b__37_0 (UnityEngine.AsyncOperation asyncOp2) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/SceneManagement/SceneEventProgress.cs:236)
UnityEngine.AsyncOperation.InvokeCompletionEvent () (at <4a31731933e0419ca5a995305014ad37>:0)
Issue Analytics
- State:
- Created a year ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
The given key was not present in the dictionary. Which key?
This exception is thrown when you try to index to something that isn't there, for example: Dictionary<String, String> test = new ...
Read more >The given key was not present in the dictionary. (UNET)
So here it is: Error: KeyNotFoundException: The given key was not present in the dictionary. System.Collections.Generic.Dictionary`2[System.
Read more >“The given key was not present in the dictionary ...
Created a new Schema attribute called MyGroupList of DataType OptionList with 2 options in the list, Option A and Option B. The purpose...
Read more >[Solved] The given key was not present in the dictionary
Solution 1. Hi, Actually this exception occur when you are accessing Dictionary for Incorrect value. Here i have created one code snippet for ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you! A new clone fixed it. Sorry for taking your time.
@outercloudstudio Thank you for submitting that. Will be looking at it today and let you know what I find.