Unity2D如何游戏修改物体(精灵)透明度

Unity引擎 · 01-03 · 245 人浏览

public Transform enemypos1;

//前三个参数为RGB数值,第四个是alpha透明度
enemypos1.GetComponent().color = new Color32(255, 255, 255, 100);

Theme Jasmine by Kent Liao