if (Input.GetKeyDown(KeyCode.Space))
{
GameObject go = GameObject.Find("diannaoBj");
string str = go.GetComponent<MeshRenderer>().material.mainTexture.name;
Debug.Log("当前屏幕上的背景图名字为+" + str);
}
if (Input.GetKeyDown(KeyCode.Space))
{
GameObject go = GameObject.Find("diannaoBj");
string str = go.GetComponent<MeshRenderer>().material.mainTexture.name;
Debug.Log("当前屏幕上的背景图名字为+" + str);
}
本文标题:material
本文链接:https://www.haomeiwen.com/subject/onwvwqtx.html
网友评论