标签:children mamicode bsp div lis style erer top set
unity3d给某个对象添加材质
public void SetMaterial() { GameObject indexGameObject=list_topIfcSlabs[5]; Renderer[] renders = indexGameObject.GetComponentsInChildren<Renderer>(); Material newMat = Resources.Load<Material>("Material/Material_TH"); renders[0].material = newMat; }
##############################
标签:children mamicode bsp div lis style erer top set
原文地址:https://www.cnblogs.com/herd/p/14899946.html