标签:com parent private getchild material oid pre erer invoke
private void Awake() { Invoke("transParent", 1); } private void transParent() { for (int i = 0; i < transform.childCount; i++) { if(transform.GetChild(transform.childCount - i - 1).GetComponent<MeshRenderer>().material!=null) transform.GetChild(transform.childCount-i-1).GetComponent<MeshRenderer>().material.DOFade(1, 5f); } }
把材质球的RenderingMode 属性改为Fade
此方法不适用所有材质球
加载DOTween插件
标签:com parent private getchild material oid pre erer invoke
原文地址:https://www.cnblogs.com/DGJS/p/12215060.html