Script Execution Order Plus Button Causes Error From Assembly Meta File
Every time that I try and press the plus button to add a new script to the Script Execution Order list, I get this error (manually typed):
ArgumentException: An item with the same key has already been added. Key: Assets/Plugins/Demigiant/DOTween/DOTween.dll.meta
System.Collections.Generic.Dictionary `2[TKey, TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <fb001e01371b4adca20013e0ac763896>:0)
I've tried uninstalling and reinstalling DOTween, but it doesn't change a thing. At the moment, there are no DOTween scripts listed in the SEO Settings. In addition, when I did uninstall DOTween, it through the same error, but for a core Rewired assembly metafile.
Has anyone seen this before? It's frustrating to deal with since I'm unable to add to the SEO list in the Unity 2020.1 editor.
Also experiencing this on Unity 2020.2.0a17.2267. I don't have DOTween installed. I've seen people say it's from Unity not being able to compile your project (there are errors), but that's not the case for me.
Same. $$anonymous$$y project compiles fine. I think it's linked to my version control software in some way. I'm using PlasticSC$$anonymous$$ and its plugin for Unity. When I turn off the plugin, it works fine. When I turn on the plugin, the same error. So it has something to do with version control for me...
I also have this problem in Unity 2020.2.0b2. It happens in my project and also in a new project where I've only imported Peek. For me it gives the same error but for a different meta file Ludiq.OdinSerializer.dll.meta. There are no other error in the project, it compile just fine.
It's weird that it changes when you enable PlasticSC$$anonymous$$, I'm just using Git and I still have the same problem.
Answer by ousingentertainment · Jan 11, 2021 at 02:13 PM
Hey, I'm not sure if you ever solved this issue, but for people coming across this issue, this page still doesn't solve the issue, but does point out that manually dragging scripts into the execution order still works. This had been a suitable work-around for me.
Thanks for linking that forum! That really is the most active place for the discussion of this issue. Yes, the current workaround is still manually dragging and dropping the script into the execution order.
Answer by Demigiant · Jan 27, 2021 at 01:09 PM
Found the reason and submitted a bug report (it's a Unity 2020 bug). It happens if the project contains a DLL that has two or more MonoBehaviour/ScriptableObjects inside. Here's a pic from my bug report that explains it: