Unity: 5.0.2f1
Lang: C#
I’m trying to set a GameObject to transparent rendering mode, ingame. It works perfectly in the editor mode, but does nothing in the windows build.
This is what i’m doing:
// make object semitransparent
Material m = transform.parent.GetComponent<Renderer>().material;
Color color = m.color;
color.a = 0.5f;
m.SetFloat("_Mode", 3f);
m.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
m.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
m.EnableKeyword("_ALPHABLEND_ON");
m.renderQueue = 3000;
m.SetColor("_Color", color);
¿Why doesn’t work in Windows Build?