Esempio n. 1
0
 private void SetMaterialOpaque()
 {
     foreach (Material CaseMaterial in ListMaterial)
     {
         CaseMaterial.SetInt("_ScrBlend", (int)UnityEngine.Rendering.BlendMode.One);
         CaseMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
         CaseMaterial.SetInt("_ZWrite", 1);
         CaseMaterial.DisableKeyword("_ALPHATEST_ON");
         CaseMaterial.DisableKeyword("_ALPHABLEND_ON");
         CaseMaterial.DisableKeyword("_ALPHAPREMULTIPLY_ON");
         CaseMaterial.renderQueue = -1;
     }
 }
Esempio n. 2
0
 private void SetMaterialFade()
 {
     foreach (Material CaseMaterial in ListMaterial)
     {
         CaseMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
         CaseMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
         CaseMaterial.SetInt("_ZWrite", 0);
         CaseMaterial.DisableKeyword("_ALPHATEST_ON");
         CaseMaterial.EnableKeyword("_ALPHABLEND_ON");
         CaseMaterial.DisableKeyword("_ALPHAPREMULTIPLY_ON");
         CaseMaterial.renderQueue = 3000;
     }
 }