📜  unity 更改透明度脚本 - C 编程语言代码示例

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

代码示例1
public GameObject gameObject;

//gameObject.GetComponent().material.color = new Color(r, g, b, a);
//gameObject.GetComponent().material.color = new Color(255.0f, 255.0f, 255.0f, 0.0f);
gameObject.GetComponent().material.color = new Color(255.0f, 255.0f, 255.0f, 100.0f);