tempQie2.transform.SetParent(GameObject.Find("Canvas").transform);
Text text = tempQie2.GetComponent<Text>();
text.text = contentStr;
text.fontSize = fontSize;
RectTransform rt = tempQie2.GetComponent<RectTransform>();
rt.sizeDelta = new Vector2(200, 300);
rt.transform.position = new Vector2(10, 10);
rt.transform.Rotate(new Vector3(0, 0, 45));
unity3d 设置Text的文字内容和位置
最新推荐文章于 2024-02-19 18:55:09 发布