gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 11:11:59 24 4
gpt4 key购买 nike

我正在尝试在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com