📅  最后修改于: 2022-03-11 14:48:50.438000             🧑  作者: Mango
//Get object renderer
rend = GetComponent();
//deprecated do not use
rend.material.maintexture = newTexture;
//proper method
rend.material.SetTexture("_BaseMap",newTexture);