Scripts can't see other scripts in certain folders ("The name does not exist in the current context")
Only recently this has started to become a big problem. Used to be an error that I could solve pretty easily with logic, but in the last couple versions, it happens on half of my projects and the only way I've been able to get around it is by scrapping the project completely and creating a new one from scratch. Not really an elegant solution, and frustrating as all hell.
I realize it has something to do with scripts residing in certain folders, but beyond that, there doesn't seem to be any rhyme or reason to the connections there. Simply moving the folders or scripts around produces dependency errors that cause more problems than they solve. I've tried changing execution orders, which has no effect at all. I've tried looking into Assembly Definitions, and that also seems to have no affect on the problem (granted, I'm certain I don't understand them correctly; I haven't been able to find any documentation on them that explains clearly or simply enough how to use them).
To be specific, I'm working with Wwise, and struggling to get scripts to recognize AkSoundEngine
. The Wwise folder is in Assets, but the bulk of the rest of the project is in a separate folder in Assets. This seems to be the root of the issue. Again, I can't simply move the Wwise folder in to the other folder (nor can I move the contents from the other folder up one level into the root of the Assets folder). This causes a whole list of errors from Wwise script dependencies. I can (seemingly) solve these errors by using an Assembly Definition Reference, but that somehow brings back the AkSoundEngine does not exist
error.
Your answer
Follow this Question
Related Questions
How to get started with Azure Blobg Storage? (How to I add the correct namespace?) 1 Answer
Namespace inside DLL file 0 Answers
Namespace Media does not exist 1 Answer
Unity won't build on Windows after reinstall 0 Answers
error CS0246: The type or namespace name `UMAGeneratorBase' could not be found 0 Answers