Unity 2019.2.*-尝试构建后出现不可见/空错误 [英] Unity 2019.2.* - Invisible/empty errors after trying to build

查看:854
本文介绍了Unity 2019.2.*-尝试构建后出现不可见/空错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之,由于某种原因我无法弄清楚,两个空白错误出现在我的日志中.这些在清除后仍然存在,并且在重新启动后仍然存在,并且会出现在每个项目中,无论是现有的还是新的.卸载并重新安装Unity似乎没有任何作用.

In short, for some reason I can not figure out, two empty errors appear in my log. These persist after clearing, on restart and occur in every project, both existing and new. Un- and re-installing Unity seem to have no effect whatsoever.

这个问题开始在Unity 2019.2.1中出现,即使更新到最新的 2019.2.14f1 ,问题仍然存在.因为它们是错误,所以它们使我无法运行或构建项目,这意味着我完全陷入了困境,无法使用Unity,直到找到解决方法.我正在使用Windows 10.

This issue started appearing for me in Unity 2019.2.1 and persists even after updating to the most recent 2019.2.14f1. Because they are errors, they prevent me from running or building the project which means I am completely stuck and can not use Unity until I find a way to fix this. I am using Windows 10.

我已经将此问题提交给Unity,但我认为这与我的安装有关,因此我不知道他们是否能够为我提供帮助.

I have already submitted this issue to Unity, but I think it is an issue with my installation, so I don't know if they'll be able to help me.

问题出现在一个项目中,并且似乎一直存在于该项目中,直到我尝试构建另一个项目为止.在我尝试构建项目的那一刻,无论我做什么,都会出现并持续存在该问题.即使一个项目完全是空的并且是全新的,在我尝试构建该项目的那一刻,错误也会出现,并且该项目将与它们一起被诅咒".

The issue appeared in one project and seemed to be contained to that one project until I attempted to build another project. The moment I try to build a project, the issue appears and will persist no matter what I do. Even if a project is completely empty and brand new, the moment I attempt to build the project, the errors appear and the project becomes "cursed" with them.

这可能是原因,但也可能是症状,原因是脚本将指示无法找到UnityEngine.有什么方法可以手动安装这些库吗?

Something that might be the cause, but might also be a symptom, is that scripts will indicate that they can not find UnityEngine. Is there any way to manually install those libraries?

即使手动卸载了Unity,Visual Studio并从AppData中删除了对Unity的所有引用,然后安装了最新版本的Unity和Visual Studio之后,问题仍然存在.

Even after manually uninstalling Unity, Visual Studio and removing all references to Unity from AppData, then installing the most recent versions of Unity and Visual Studio, the issue persists.

我无法在另一台计算机上测试受影响的项目,但是如果这样做,我将更新此问题. 如果Unity确实给我提供了解决方案,我将其发布.

I have not been able to test an affected project on a different computer, but I will update this question if I do. If Unity does get back to me with a solution I'll post that.

此问题的真正原因是,无论出于何种原因,Unity都找不到罗斯林.因此,为什么脚本无法编译,导致Unity编辑器本身受到影响.

The true cause of the issue was that for whatever reason, Unity could not find Roslyn. Hence why scripts were unable to compile, which resulted in the Unity Editor itself being affected.

我已经为该问题添加了解决方案,作为对此问题的解答.

I've added the solution to this issue as an answer to this question.

推荐答案

此问题已通过Unity团队的答复得以解决!

This issue has been solved with a response from the Unity team!

这是他们的解决方案:

Please try the following steps to fix the issue:

 1. Close any open Unity Editors
 2. Go to "C:\Program Files\Unity\Hub\Editor\(Your Unity version)\Editor\Data\Tools\RoslynScripts"
 3. Edit "unity_csc.bat" (You might have to run Notepad as an administrator to be able to save it)
 4. Replace the line that says "%APPLICATION_CONTENTS%\Tools\Roslyn\csc" /shared % with the following: "C:\Program Files\Unity\Hub\Editor\(Your Unity version)\Editor\Data\Tools\Roslyn\csc.exe" /shared %

将其留在这里供以后进行任何Google搜索.

Leaving it here for any future Google searches.

这篇关于Unity 2019.2.*-尝试构建后出现不可见/空错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆