An item with the same key has already been added. Key: SharedItemDefinition

atmuc

Member
I get following error when I try to open BehaviorDesigner editor. I have UCC and UIS.

ArgumentException: An item with the same key has already been added. Key: SharedItemDefinition
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <9577ac7a62ef43179789031239ba8798>:0)
BehaviorDesigner.Editor.VariableInspector.FindAllSharedVariableTypes (System.Boolean removeShared) (at <59a5905788cf4a0d801f900b29f20efe>:0)
BehaviorDesigner.Editor.VariableInspector.DrawHeader (BehaviorDesigner.Runtime.IVariableSource variableSource, System.Boolean fromGlobalVariablesWindow, System.Single& variableStartPosition, System.String& variableName, System.Boolean& focusNameField, System.Int32& variableTypeIndex, System.Int32& selectedVariableIndex, System.String& selectedVariableName, System.Int32& selectedVariableTypeIndex) (at <59a5905788cf4a0d801f900b29f20efe>:0)
BehaviorDesigner.Editor.VariableInspector.DrawVariables (BehaviorDesigner.Runtime.IVariableSource variableSource, BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.String& variableName, System.Boolean& focusNameField, System.Int32& variableTypeIndex, UnityEngine.Vector2& scrollPosition, System.Collections.Generic.List`1[System.Single]& variablePosition, System.Single& variableStartPosition, System.Int32& selectedVariableIndex, System.String& selectedVariableName, System.Int32& selectedVariableTypeIndex) (at <59a5905788cf4a0d801f900b29f20efe>:0)
BehaviorDesigner.Editor.GlobalVariablesWindow.OnGUI () (at <59a5905788cf4a0d801f900b29f20efe>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <afa5b9a1793446ff98b741dc036c4c6e>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <afa5b9a1793446ff98b741dc036c4c6e>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <afa5b9a1793446ff98b741dc036c4c6e>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <afa5b9a1793446ff98b741dc036c4c6e>:0)
UnityEditor.DockArea.OldOnGUI () (at <afa5b9a1793446ff98b741dc036c4c6e>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
 
If you haven't updated both the UCC and UIS integrations in awhile make sure you do so - this looks related to this:

 
Top