void Start() { //修改物件節點的:透明度 this.GetComponent().material.SetColor("_Color", new Color(1, 0, 0, 0.05f)); this.GetComponent().material.SetFloat("_Mode", 3); this.GetComponent().material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); this.GetComponent().material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); this.GetComponent().material.EnableKeyword("_ALPHABLEND_ON"); this.GetComponent().material.renderQueue = 3000; }