Error when load scene

Options
Suddenly I got this error when load scene. Is there any hints on why it is happending?

I have put breakpoints in my SceneLoadDone, but it didn't run even the first line in the function.

ArgumentException: An item with the same key has already been added. Key: [UniqueId 80d9e2c3-c22e-417d-a314-836434877a80]
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
BoltCore.UpdateSceneObjectsLookup () (at :0)
BoltCore.SceneLoadDone (Bolt.SceneLoadState state) (at :0)
BoltSceneLoader.Update () (at :0)

Comments

  • Gil
    Gil
    edited November 2019
    Options
    ok, I fixed it. The error was caused by one of the BoltEntity prefab. All I have to do is remove the BoltEntity component. Compile bolt, then add it back and compile again.