AlexIsCoolYo
New member
I've got an issue where I'm constantly getting the error message "an item with the same key had already been added".
It happened after I went into prefab mode on an object, then I selected the BT the object has, from my assets folder and opened the BT window, then I deleted a couple of variables and after I deleted them I selected the object & the variables I just deleted popped back.
Now regardless of when im in prefab mode or not my editor is constantly getting the errors as seen below when I either select the prefab with the BT or just the BT asset. It seems to keep trying to add copies of the same variable, giving me the error. I've deleted the BT from the object & then removed the duplicate variables from the BT asset, but soon as I re-add the BT to the object I get the errors again.
I've had to just delete the entire BT asset & remake it.
Any help is great, thanks
Error Stack:
[Exception] ArgumentException: An item with the same key has already been added. Key: ProjectileAttack
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert() at <695d1cc93cca45069c528c15c9fdd749>:0
System.Collections.Generic.Dictionary`2[TKey,TValue].Add() at <695d1cc93cca45069c528c15c9fdd749>:0
BehaviorSource.UpdateVariablesIndex() at <5ffe9660511749ad80bf7fef3a31518a>:0
BehaviorSource.SetVariable() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.CheckForSerialization() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.CheckForSerialization() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.DrawTaskGizmos() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.OnDrawGizmosSelected() at <5ffe9660511749ad80bf7fef3a31518a>:0
GUIUtility.ProcessEvent()
It happened after I went into prefab mode on an object, then I selected the BT the object has, from my assets folder and opened the BT window, then I deleted a couple of variables and after I deleted them I selected the object & the variables I just deleted popped back.
Now regardless of when im in prefab mode or not my editor is constantly getting the errors as seen below when I either select the prefab with the BT or just the BT asset. It seems to keep trying to add copies of the same variable, giving me the error. I've deleted the BT from the object & then removed the duplicate variables from the BT asset, but soon as I re-add the BT to the object I get the errors again.
I've had to just delete the entire BT asset & remake it.
Any help is great, thanks
Error Stack:
[Exception] ArgumentException: An item with the same key has already been added. Key: ProjectileAttack
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert() at <695d1cc93cca45069c528c15c9fdd749>:0
System.Collections.Generic.Dictionary`2[TKey,TValue].Add() at <695d1cc93cca45069c528c15c9fdd749>:0
BehaviorSource.UpdateVariablesIndex() at <5ffe9660511749ad80bf7fef3a31518a>:0
BehaviorSource.SetVariable() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.CheckForSerialization() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.CheckForSerialization() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.DrawTaskGizmos() at <5ffe9660511749ad80bf7fef3a31518a>:0
Behavior.OnDrawGizmosSelected() at <5ffe9660511749ad80bf7fef3a31518a>:0
GUIUtility.ProcessEvent()