Unity2017升级到Unity2018在Window7上输出空异常错误问题

Unity2017升级到Unity2018在Window7上输出空异常错误问题

一、环境Window7

二、现象Unity报空异常(.NET 4.x Equivalent)

三、日志

csharp 复制代码
-----CompilerOutput:-stdout--exitcode: -2147450750--compilationhadfailure: True--outfile: Temp/Unity.TextMeshPro.dll
-----CompilerOutput:-stderr----------
Failed to load the dll from [?.], HRESULT: 0x80070057
 
The library hostfxr.dll was found, but loading it from C:\Program Files\Unity201918f1\Editor\Data\Tools\Roslyn\hostfxr.dll failed
 
  - Installing .NET Core prerequisites might help resolve this problem.
 
     http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
 
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/Unity.TextMeshPro.dll

四、解决方案

第一种解决方案

将Unity中Inspector中的Scripting Runtime Version* 更改为 .NET3.5即可,但是这种方法无法保证C#语法6.0规范。这种方案需要更改C# 6.0语法为更低级的语法。


第二种解决方案

在日志中我们能看到其实是Win7的.NET Core不支持,所以下载一个最新的.NET Core就可以解决。

https://www.microsoft.com/zh-cn/download/details.aspx?id=26764

下载完安装即可

Window10中不会存在这个问题(win10的.Net Core版本比较新 支持)

相关推荐
Sator114 小时前
Unity关于射击游戏人物动画的设计经验
游戏·unity·游戏引擎
冰凌糕14 小时前
Unity3D Shader 坐标空间详解
unity
心前阳光1 天前
Unity之ScrollRect简易实现
unity·游戏引擎
WarrenMondeville2 天前
9.Unity面向对象-对象池
unity
KaGme2 天前
生成3DGS场景在unity中的呈现
3d·unity·游戏引擎
zyh______2 天前
关于unity的序列化
unity·游戏引擎
星夜泊客2 天前
C# : 引用类型都存在堆上吗
unity·c#
点量云实时渲染-小芹2 天前
Unity模型数字孪生虚拟仿真webgl推流卡实时云渲染推流
unity·webgl·数字孪生·实时云渲染·虚拟仿真·云推流
mxwin3 天前
Unity Shader 齐次坐标与透视除法理解 SV_POSITION 的 w 分量
unity·游戏引擎·shader
NPUQS3 天前
【Unity 3D学习】Unity 与 Python 互通入门:点击按钮调用 Python(超简单示例)
学习·3d·unity