material

if (Input.GetKeyDown(KeyCode.Space))
        {
            GameObject go = GameObject.Find("diannaoBj");
            string str = go.GetComponent().material.mainTexture.name;
            Debug.Log("当前屏幕上的背景图名字为+" + str);
        }

你可能感兴趣的:(material)