动态给物体更换材质球(_DetailAlbedoMap)
public GameObject obj;
//需要更换的贴图(可以直接使用Texture)
public RawImage camRawImage;
//更换第二材质
obj.GetComponent().material.SetTexture(\”_DetailAlbedoMap\”, camRawImage.texture);
//更换第一材质
obj.GetComponent().materials[0].mainTexture = camRawImage.texture;