I have this error and have absolutely no idea what is causing it or how to fix it. And it’s putting my work on hold at the moment:
Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.ArgumentException: Key duplication when adding: MethodBuilder [BaseChunk::Generate]
I see nothing wrong with my BaseChunk class or my Generate method on that class. And, being the somewhat new programmer I am, have no idea what MethodBuilder is or how there’s any sort of key duplication happening relating to it.
This seems entirely out of my control. I can’t see any changes I made today that would lead to this.
Has anyone seen errors like this? Do you know how to handle them? Right now I’m assuming it’s a Unity bug.
You should also post the case number of your bug, such that if a developer finds this thread or is pointed to it, can directly check it and doesn’t need to search for it.
Bump, in case anyone else has found a solution to this yet. I sure haven’t.
Edit:
I’ve found a solution now for myself. My issue was in an abstract base class, BaseChunk. I still don’t know what it was. All I did was switch to using an interface instead of an abstract base class, and it works now. I’d rather have not used an interface for this purpose, but at least I can get back to work now!