Search Unity

Scripts in the Editor folders throw a "Type or namespace could not be found" error

Discussion in 'Editor & General Support' started by adreamvoyager_unity, Aug 8, 2019.

  1. adreamvoyager_unity

    adreamvoyager_unity

    Joined:
    Oct 16, 2018
    Posts:
    14
    Hi,

    I have been struggling with a unity glitch for many months. I am working on a VR project with Steam VR. After months of development this issue started out of nowhere, I have been unable to find a long term remedy for the issue.

    I have several custom inspector files within the "Editor" folders in the project. Unity claims that the "Type or namespace cannot be found" on the scripts that the custom inspectors are referencing. Whenever I open the script in Visual Studios 2017, nothing is underlined in red, and no errors are found. The only place the errors are showing up is in the Unity Editor.

    Whenever I press play, unity stops me and tells me "I cannot test the game until all errors are resolved." However, it is very clear that there are no errors in the scripts and everything is written correctly.

    I have deleted the sln file, library, and cache files. This doesn't fix the error.

    The temporary fix, I have found is to create a new Unity Project, then drag and drop all of the files inside the assets folder into the new project.

    It takes Unity about an hour to process............

    Everything runs correctly. No errors. All the scripts run fine.

    Randomly, however, within a day, a week, or sometimes even an hour, Unity once again, inside the new project, begins telling me that the custom inspector scripts inside the editor folders have missing references, when in reality they don't have any missing references.

    This issue has been incredibly troublesome for my work. Has anyone ever encountered this issue ,or does anyone have any solutions that might be helpful?

    Thanks!

    Screenshot:

    View attachment 464324