type or namespace ... could not be found

my project was working fine before but is suddely giving me hundreds of these errors when i try to build it in monodevelop:

The type or namespace name `UISpriteData’ could not be found. Are you missing a using directive or an assembly reference? (CS0246)

that particular one is related to NGUI, but it’s the same for tons of other scripts in other libraries, and even unity engine bits. it seems that any script inside an editor folder can no longer access any scripts outside of editor folders - i tried putting UISpriteData into the editor folder, and this particular error disappeared (but the hundreds of others didn’t obviously)

what could be causing this?

It turns out i needed to put my libraries into a folder called Plugins, and now it works

A couple of strange things:

  • I don’t know why this isn’t the default import location for them
  • and I don’t know why it’s been working fine for weeks in their old locations