Unity 2021.x新建項目提示Enter safe mode/新建項目報錯


以前一般是打開舊的工程,而里面有編譯等錯誤,或者用不同版本打開不同工程就會出現“Enter Safe Mode”,近期發現新版本(2021.X)的editor新建項目也會出現“Enter Safe Mode”。

Safe Mode - Unity 手冊

情況一:

勾選了托管至plastic SCM導致的,用不上的話不勾就好,或者新建項目成功后再托管。

情況二:

點擊進入Enter safe mode后會有一系列報錯

Library/PackageCache/com.unity.XXXXXXXXX

遇到過好多種不同的包報錯,要不就是升級至最新版本,要不就remove掉,一般就這樣解決了。

比如:

visualscripting@1.5.2的報錯,點擊Exit safe mode

 

 

點開packageManager找到這個包升級到最新版本就好

有時候包還是pre版本,還需要在package manager的設置中Advance的settings

把enable pre-release packages勾選上

還有:

Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.

error CS2015: 'E:\unitytest\lowpolytest\Library\PackageCache\com.unity.test-framework@1.1.16\UnityEditor.TestRunner\TestLaunchers\TestLauncherBase.cs' is a binary file instead of a text file error CS2015: 'E:\unitytest\lowpolytest\Library\PackageCache\com.unity.test-framework@1.1.16\UnityEditor.TestRunner\TestSettings\ITestSettings.cs' is a binary file instead of a text file error CS2015: 'E:\unitytest\lowpolytest\Library\PackageCache\com.unity.test-framework@1.1.16\UnityEditor.TestRunner\TestSettings\TestSettingsDeserializer.cs' is a binary file instead of a text file

remove掉

具體還是得看看自己項目里用不用這個包,一般我是升級優先與remove,畢竟是新建工程后自帶的包,說不定還是有用的。

 

如果你有其他方法解決,歡迎在評論區分享!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM