UnityEditor.MaterialKeywordEnumDrawer.GetKeywordName C# (CSharp) Method

GetKeywordName() private static method

private static GetKeywordName ( string propName, string name ) : string
propName string
name string
return string
        private static string GetKeywordName(string propName, string name)
        {
            return (propName + "_" + name).Replace(' ', '_').ToUpperInvariant();
        }

Usage Example

示例#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);
             }
         }
     }
 }
All Usage Examples Of UnityEditor.MaterialKeywordEnumDrawer::GetKeywordName