您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

21 行
601 B

namespace UnityEditor.Experimental.Rendering
{
public class ShaderGeneratorHelper
{
// This function is a helper to follow unity convertion
// when converting fooBar ro FOO_BAR
public static string InsertUnderscore(string name)
{
for (int i = 1; i < name.Length; i++)
{
if (char.IsLower(name[i - 1]) && char.IsUpper(name[i]))
{
// case switch, insert underscore
name = name.Insert(i, "_");
}
}
return name;
}
}
}