xiugai
This commit is contained in:
parent
362f08f689
commit
dddb4ebf32
@ -7,7 +7,8 @@
|
||||
"GUID:75b6f2078d190f14dbda4a5b747d709c",
|
||||
"GUID:a19b414bea3b97240a91aeab9a8eab36",
|
||||
"GUID:83a193b118cfbef48a344187e07f53bb",
|
||||
"GUID:acfef7cabed3b0a42b25edb1cd4fa259"
|
||||
"GUID:acfef7cabed3b0a42b25edb1cd4fa259",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
|
@ -12,6 +12,14 @@ namespace AlicizaX.UI.Extension.Editor
|
||||
GameObject selectionObject = Selection.activeGameObject;
|
||||
var gameObject = new GameObject("UXTextMeshPro", typeof(UXTextMeshPro));
|
||||
gameObject.transform.SetParent(selectionObject.transform);
|
||||
var rectTransform = gameObject.GetComponent<RectTransform>();
|
||||
var uxTextMeshPro = gameObject.GetComponent<UXTextMeshPro>();
|
||||
uxTextMeshPro.text="UXTextMeshPro";
|
||||
rectTransform.anchoredPosition = Vector2.zero;
|
||||
rectTransform.localPosition = Vector3.zero;
|
||||
rectTransform.pivot = new Vector2(0.5f, 0.5f);
|
||||
rectTransform.localScale = Vector3.one;
|
||||
Selection.activeGameObject = gameObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user