Unity crashes on startup: "Got a UNKNOWN while executing native code"

Hello everyone. This is an issue that has been bugging me for a while.


I am currently on editor version 2021.3.6f1, although I’ve seen it also happen on 2021.3.3f1. Whenever I open a project (any project, even a brand-new one), the editor will load and then immediately crash. I’ve found the following in the logs:

Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.

I have tried the following fixes:

  • Creating a new project to test if it’s a project-related issue (it is not)
  • Downloading a new engine version to test if it’s a version-related issue (it is not)
  • Reinstalling Unity (hub and engines)
  • Clearing Unity caches
  • Reinstalling video card drivers

There is one workaround I have, which works by deleting the Library folder before opening my project. However, it’s quite tedious, seeing as how the Library folder is regenerated every time I open my project. This is what I’ll use if I don’t find a fix, but I’d like to see if I can eliminate the issue itself first. Any help is appreciated.

FIXED!

It turns out I had to uninstall Unity, and then delete the Unity folder.