c# - DllNotFoundException : TMPro_Plugin, 在 Linux 上使用 TextMesh Pro

标签 c# linux unity3d text fonts

我正在尝试在 Fedora 27 上的 Unity 2018.1.6f1 上运行 TextMesh Pro 1.2.4 的字体 Assets 创建器。我遇到了以下错误:

我听说 TextMesh 在 Linux 上还不被支持。现在还是这样吗?

DllNotFoundException: TMPro_Plugin TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.DrawControls () (at /root/.config/unity3d/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:704) TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.OnGUI () (at /root/.config/unity3d/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:266) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:291) UnityEditor.HostView.Invoke (System.String methodName) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:284) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:257) UnityEditor.DockArea.OldOnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:386) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:234) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:372) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:356) UnityEngine.Experimental.UIElements.EventDispatcher.DispatchEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:215) UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:224) UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:77) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:184)

llNotFoundException: TMPro_Plugin TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.OnDisable () (at /root/.config/unity3d/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:204) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

最佳答案

生成文本所需的本地代码在 Linux 上尚不可用。插件本身应该在构建的运行时工作,但 Linux 不支持其编辑器工具。编辑器工具仅在 Windows 和 Mac 上受支持。

最初不支持的原因是因为用Unity封装游戏时很少有人使用Linux。另外 Unity Editor 本身并不正式支持 Linux。无论他们对它有什么支持,它仍处于试验模式,并且有许多问题使其不值得在这一点上使用。

既然TextMesh Pro现在被Unity收购了,那么很有可能会支持Linux。您应该等到 Unity 最终将其与 Unity 集成,也许他们会添加对 Linux 的支持。目前,我认为您应该提交错误报告以提醒 Unity 这个问题仍然存在,然后使用 Text 组件直到他们修复它。如果您仍想使用 TextMesh Pro,解决方法是使用 VMware Workstation 在您的 Linux 上运行 Windows 或 MacOS,然后您可以使用它们来创建文本资源并将它们作为包导出和导入到您的 Linux 项目中。

关于c# - DllNotFoundException : TMPro_Plugin, 在 Linux 上使用 TextMesh Pro,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51554186/

相关文章:

linux - 当我使用协作 github 存储库时,crontab 无法识别 github 用户名

linux - 在vi中搜索并替换以下内容

c# - RuntimeInitializeOnLoad 未使用条件编译运行

c# - 在 Unity3D 中无延迟地截取屏幕截图

c# - 在 Internet Explorer 8 和 9 中播放非 pcm (gsm) ".wav"-文件

c# - 谁能解释一下以下两个查询的区别?

php - 将命令置于后台并通过 PHP exec() 获取 PID?

c# - 如何正确关闭或销毁TCP客户端?

c# - IIS 7 上的 nHibernate,SQLClientPermissionException

C# Automapper - 以不同方式从一种类型映射具有多个属性的类