Ability to start a Project in Safe Mode

It would be useful to be able to start a project in Safe Mode simlpy by right clicking and selecting an option to do so in the hub.

1 Like

Why would that be useful?

If there are errors, safe mode is entered. If there are no errors, there’s no point going into safe mode.

I have a project that has a missing script on a prefab. Unity won’t save until the error is corrected, but I can’t correct the error without saving. Safe Mode might be helpful in this case.

Unity doesn’t always go in safe mode when errors happen.

There are cases i.e. when upgrading projects or downgrading projects that packages get messed up, yet unity does not identify the mess, and going in safe mode is the best/fastest way to resolve them without further messing up the project.

the best reason i found to go into safe mode in 2024 is to turn on Parellel Importer and set the number of import worker threads as well. And to fix errors ofcourse.

I’d find this useful to when I want to update a package that has DLLs. For example, the FMOD for Unity package. You cannot delete the entire folder because it says the DLL is in use.

1 Like

Exactly. There are many use cases for that.

I was trying to automate builds and Unity has itself utterly stuck and refusing to rebuild the project even after restarts so being able to launch into a safe mode would help debug what the hell is going on.

Even editing scripts to add errors it doesn’t care cause its loading the last build no doubt. Guess its time to delete .sln files or something

If your project isn’t opening, check the editor.log.
If the project does open, there’s no point entering safe mode if the problem is with making builds.
If you can successfully build, but the build you run isn’t what you expect, then it’s likely you’re just launching the wrong executable.

In any case, try deleting the /Library folder and also the build output folder to avoid any confusion.

You misunderstand. Unity would open the project and have its last solution stuck and would throw an error because of a build script as soon as I tried to rebuild the solution. No new code changes would be registered at all, Unity Really got itself into a state.

I wanted it to enter safe mode so it would stop trying to make a build as soon as Unity launched/recompiled because it had some setting stuck somewhere.

I eventually forced it to enter safe mode to no avail in this case but the point stands. Its always helpful to be able to load into a safe mode, if one is available, because it helps eliminate potenial causes when something goes wrong.

I did finally fix my issues by trashing the library folder but was searching for ways to avoid that since my project is huge and rebuilding everything takes a lot of time.

That means you made a script that starts making a build, probably by using InitializeOnLoadMethod or similar?

In that case, just comment out that script’s init method with the IDE or any text editor.

Otherwise I still don’t understand the issue.

No Unity just got itself that confused but again you misunderstand.

I’m not looking for help, I’m just chiming in that the need for enterting safe mode as needed is important.