From 3fb8c79b3ac8b8598fb38e9de98d811029a34244 Mon Sep 17 00:00:00 2001 From: linxinfa <37791251+linxinfa@users.noreply.github.com> Date: Fri, 5 Nov 2021 14:07:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Editor/I18NText/I18NTextInspector.cs | 23 +-------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/Assets/Editor/I18NText/I18NTextInspector.cs b/Assets/Editor/I18NText/I18NTextInspector.cs index 87ab10e..e756027 100644 --- a/Assets/Editor/I18NText/I18NTextInspector.cs +++ b/Assets/Editor/I18NText/I18NTextInspector.cs @@ -35,26 +35,5 @@ public class I18NTextInspector : Editor GUILayout.EndHorizontal(); } - [MenuItem("GameObject/UI/I18NText (多语言文本)", false)] - static void CreateI18NText() - { - if (null == Selection.activeObject || Selection.activeObject.GetType() != typeof(GameObject)) - { - GameLogger.LogError("请在Hierarchy视图的某个GameObject节点上右键鼠标"); - return; - } - I18N.instance.Init(); - var parent = ((GameObject)(Selection.activeObject)).transform; - var go = new GameObject("I18NText"); - - go.AddComponent(); - go.transform.SetParent(parent, false); - var text = go.AddComponent(); - text.color = Color.black; - text.fontSize = 22; - text.alignment = TextAnchor.MiddleCenter; - text.i18NId = 1; - - text.Refresh(); - } + } -- GitLab