- Home /
How do I solve this problem? same key error
unity version : 4.6.6f2
build Platform : iOS
build error message: Error building Player: ArgumentException: An element with the same key already exists in the dictionary.
How do I solve this problem?
Any more info on where the error comes from (script)? it means that a dictionary, which must have unique keys, has one key twice.
you mean you have this error when you are building? or when you play your application once it is built? do you have any other errors? the error should give you information in what script the error occurred.
It seems you are trying to add an object that is already in the dictionary. So before adding an object to the dictionary first check if it doesn't contains the new key you are trying to add.
Your answer

Follow this Question
Related Questions
Check if two strings are the same 2 Answers
Check if GameObjects are from the same prefab? 1 Answer
Error while creating WP8 build 5 Answers
What are these errors I get when I'm trying to build? 0 Answers