"Namespace 'global::' already contains a definition for" various items

StackOverflow https://stackoverflow.com/questions/21970649

  •  15-10-2022
  •  | 
  •  

Вопрос

I recently updated a project I wrote in April 2013 to the latest version of Unity (OS X to Windows also, if that affects anything). I'm now getting a few errors, all of the following form:

Assets/Scripts/PauseMenu.cs(4,14): error CS0101: The namespaceglobal::' already contains a definition for PauseMenu'

I'm not sure how to find where PauseMenu might be defined in the global namespace. Is there a way to find where it's original definition is? I didn't have this problem before moving the project over.

Это было полезно?

Решение

I found the files. They were sitting in an "unused" directory. I'm not sure at this point why I kept those files around, but it makes sense now that this was a problem.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top