GetKeywordName() private static method

private static GetKeywordName ( string propName, string name ) : string
propName string
name string
return string
Exemplo n.º 1
0
 private void SetKeyword(MaterialProperty prop, int index)
 {
     for (int index1 = 0; index1 < this.keywords.Length; ++index1)
     {
         string keywordName = MaterialKeywordEnumDrawer.GetKeywordName(prop.name, this.keywords[index1]);
         foreach (Material target in prop.targets)
         {
             if (index == index1)
             {
                 target.EnableKeyword(keywordName);
             }
             else
             {
                 target.DisableKeyword(keywordName);
             }
         }
     }
 }
 private void SetKeyword(MaterialProperty prop, int index)
 {
     for (int i = 0; i < this.keywords.Length; i++)
     {
         string keywordName           = MaterialKeywordEnumDrawer.GetKeywordName(prop.name, this.keywords[i].text);
         UnityEngine.Object[] targets = prop.targets;
         for (int j = 0; j < targets.Length; j++)
         {
             Material material = (Material)targets[j];
             if (index == i)
             {
                 material.EnableKeyword(keywordName);
             }
             else
             {
                 material.DisableKeyword(keywordName);
             }
         }
     }
 }