📜  ui统一没有附加“材料”-无论代码示例

📅  最后修改于: 2022-03-11 15:00:27.338000             🧑  作者: Mango

代码示例1
Aha! So the material is never actually a component of an object. Its an extension of the renderer component.
Got it, thanks!

GameObject go_child = go.transform.FindChild("dummyspown").gameObject;
go_child.GetComponent().material.SetColor("_Color", Color.red);