提交 3fb8c79b 编写于 作者: L linxinfa

国际化多语言

上级 cbc2af29
......@@ -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<RectTransform>();
go.transform.SetParent(parent, false);
var text = go.AddComponent<I18NText>();
text.color = Color.black;
text.fontSize = 22;
text.alignment = TextAnchor.MiddleCenter;
text.i18NId = 1;
text.Refresh();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册