我正在尝试在Fedora 27上的Unity 2018.1.6f1上运行TextMesh Pro 1.2.4的字体资产创建器。我遇到以下错误:
我听说Linux尚不支持TextMesh。还是真的吗?
DllNotFoundException:TMPro_Plugin TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.DrawControls()(在 /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()(在 /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 活页夹,System.Object []参数,System.Globalization.CultureInfo 文化)(在:0处)以 TargetInvocationException:的目标已引发异常 调用。 System.Reflection.MonoMethod.Invoke(System.Object obj, System.Reflection.BindingFlags invokeAttr,System.Reflection.Binder 活页夹,System.Object []参数,System.Globalization.CultureInfo 文化)(在:0) System.Reflection.MethodBase.Invoke(System.Object obj, System.Object []参数)(位于:0) UnityEditor.HostView.Invoke(System.String methodName,System.Object obj)(在 /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:291) UnityEditor.HostView.Invoke(System.String methodName)(在 /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:284) UnityEditor.HostView.InvokeOnGUI(UnityEngine.Rect onGUIPosition)(在 /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:257) UnityEditor.DockArea.OldOnGUI()(在 /home/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:386) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt)(在 /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:234) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e)(在 /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:372) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt)(在 /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:356) UnityEngine.Experimental.UIElements.EventDispatcher.DispatchEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel面板)(在 /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:215) UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel面板)(在 /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:224) UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID,System.IntPtr nativeEventPtr)(在 /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:77) UnityEngine.GUIUtility.ProcessEvent(System.Int32 instanceID, System.IntPtr nativeEventPtr)(在 /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:184)
llNotFoundException:TMPro_Plugin TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.OnDisable()(在 /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)
答案 0 :(得分:2)
生成文本所需的代码本机端在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项目中。