Unity3D UGUI 文本框和编辑框InputField 设置文字

using UnityEngine.UI;

GameObject go = GameObject.Find("inputFieldName");

go.GetComponent<InputField>().text = hitInfo.transform.parent.GetComponent<TextMesh>().text;

获取文本

GameObject go = GameObject.Find("inputFieldName")

go.GetComponent<Text>().text

猜你喜欢

转载自blog.csdn.net/qq_21743659/article/details/128445501
今日推荐