- Home /
Changing code every once in a while causes an internal compiler error
In some of my Unity projects, sometimes when I change code randomly Unity will throw an "internal compiler error" saying it can't access a path because access is denied. I looked around, and I determined that this is NOT a problem with my antivirus system (it is turned off) and I am running Unity as administrator, so I have no clue what could be causing my problem.
Furthermore, it only happens after I change specific parts of code. Pieces of code that seem to have no connection to each other. For example, I had a basic MonoBehaviour
class that had an OnTriggerEnter2D
method, and all was swell. But as soon as I changed the name of the method to OnTriggerStay2D
, it threw the UnauthorizedAccessException
.
What on earth is causing my predicament? How could changing small bits of seemingly working code cause the error at random? Are there any fixes?
Also, it might be important to note that my entire Unity project is stored in both a github repo and a Dropbox folder.
it's most likely dropbox in this case - the syncing could be occurring when the compiler tries to access the files, thereby causing the error. i've seen this happen in the past and, if it's not av related, it usually turns out to be dropbox.
move your project out of dropbox, or accept the annoying behavior.
hopefully you're not relying on dropbox for a proper backup.
$$anonymous$$oving it out of the dropbox folder seems to have fixed the problem, thanks!