简体   繁体   English

在 Debian 10 GNU/Linux 中运行 Unity 的 TextMesh Pro 错误

[英]TextMesh Pro errors running Unity in Debian 10 GNU/Linux

I started to try Unity GNU/Linux version.我开始尝试 Unity GNU/Linux 版本。 I got a project in my job that was written in Unity Editor version 5.6.6f2 for Windows.我的工作中有一个项目是用 Unity Editor 版本 5.6.6f2 为 Windows 编写的。 I could open the project in Unity Editor version 2019.3.8f1 after Unit Hub converting it for this newer version.在 Unit Hub 将其转换为新版本后,我可以在 Unity Editor 版本 2019.3.8f1 中打开该项目。

I'm getting a series of building errors now.我现在遇到了一系列构建错误。 And many of them are related to TextMesh Pro Asset in scripts generated during the building.其中很多都与构建过程中生成的脚本中的TextMesh Pro Asset相关。 Like喜欢

Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs(405,34): error CS0029: Cannot implicitly convert type 'UnityEngine.TextCore.FaceInfo' to 'TMPro.FaceInfo'
Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAssetUtilities.cs(302,82): error CS1061: 'FaceInfo' does not contain a definition for 'pointSize' and no accessible extension method 'pointSize' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAssetUtilities.cs(344,82): error CS1061: 'FaceInfo' does not contain a definition for 'pointSize' and no accessible extension method 'pointSize' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs(612,84): error CS1061: 'FaceInfo' does not contain a definition for 'tabWidth' and no accessible extension method 'tabWidth' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs(649,28): error CS1061: 'FaceInfo' does not contain a definition for 'capLine' and no accessible extension method 'capLine' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs(652,28): error CS1061: 'FaceInfo' does not contain a definition for 'capLine' and no accessible extension method 'capLine' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)

There's a log file, Logs/Packages-Update.log , that I suppose is related to the updates made when converting the project from 5.6.6f2 version to 2019.3.8f1 version.有一个日志文件Logs/Packages-Update.log ,我认为它与将项目从 5.6.6f2 版本转换为 2019.3.8f1 版本时所做的更新有关。 The content of that file is该文件的内容是

Packages were changed.
Update Mode: resetToDefaultDependencies

The following packages were added:
  com.unity.collab-proxy@1.2.16
  com.unity.ide.rider@1.1.4
  com.unity.ide.vscode@1.1.4
  com.unity.modules.ai@1.0.0
  com.unity.modules.androidjni@1.0.0
  com.unity.modules.animation@1.0.0
  com.unity.modules.assetbundle@1.0.0
  com.unity.modules.audio@1.0.0
  com.unity.modules.cloth@1.0.0
  com.unity.modules.director@1.0.0
  com.unity.modules.imageconversion@1.0.0
  com.unity.modules.imgui@1.0.0
  com.unity.modules.jsonserialize@1.0.0
  com.unity.modules.particlesystem@1.0.0
  com.unity.modules.physics@1.0.0
  com.unity.modules.physics2d@1.0.0
  com.unity.modules.screencapture@1.0.0
  com.unity.modules.terrain@1.0.0
  com.unity.modules.terrainphysics@1.0.0
  com.unity.modules.tilemap@1.0.0
  com.unity.modules.ui@1.0.0
  com.unity.modules.uielements@1.0.0
  com.unity.modules.umbra@1.0.0
  com.unity.modules.unityanalytics@1.0.0
  com.unity.modules.unitywebrequest@1.0.0
  com.unity.modules.unitywebrequestassetbundle@1.0.0
  com.unity.modules.unitywebrequestaudio@1.0.0
  com.unity.modules.unitywebrequesttexture@1.0.0
  com.unity.modules.unitywebrequestwww@1.0.0
  com.unity.modules.vehicles@1.0.0
  com.unity.modules.video@1.0.0
  com.unity.modules.vr@1.0.0
  com.unity.modules.wind@1.0.0
  com.unity.modules.xr@1.0.0
  com.unity.test-framework@1.1.13
  com.unity.textmeshpro@2.0.1
  com.unity.timeline@1.2.14
  com.unity.ugui@1.0.0

See the com.unity.textmeshpro@2.0.1 line in that.请参阅其中的com.unity.textmeshpro@2.0.1行。

I'm totally new to Unity and I don't use Windows.我对 Unity 完全陌生,我不使用 Windows。 So I'm wondering if that have something related to C# scripting (like libraries that I have to install in Debian to properly compile a project), or if the errors are specific to TextMesh Pro asset etc.所以我想知道这是否与 C# 脚本相关(比如我必须在 Debian 中安装的库才能正确编译项目),或者错误是否特定于 TextMesh Pro 资产等。

If anyone have had this type of error or can give me tips to make Unity works in a Debian GNU/Linux environment...如果有人遇到过这种类型的错误,或者可以给我提示让 Unity 在 Debian GNU/Linux 环境中工作...

  1. Delete the old version of TextMesh Pro in the Asset folder在 Asset 文件夹中删除旧版 TextMesh Pro

  2. Reopen Project重新打开项目

  3. Window -> TextMeshPro -> Import TMP essentials Window -> TextMeshPro -> 导入TMP要领

  4. Window -> TextMeshPro -> Project Files GUID Remapping Tool. Window -> TextMeshPro -> 项目文件 GUID 重映射工具。

  5. Scan & Save.扫描并保存。

This will update the project and fix all missing TMP scripts.这将更新项目并修复所有缺失的 TMP 脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM