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

26 行
1.3 KiB

using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Experimental.Rendering;
public class LegacyMobileToLowendMobileUpgrader : MaterialUpgrader
{
[MenuItem("LowEndMobilePipeline/Material Upgraders/Upgrade Legacy Mobile Materials to LowEndMobile")]
public static void UpgradeMaterialsToLD()
{
List<MaterialUpgrader> materialUpgraders = new List<MaterialUpgrader>();
materialUpgraders.Add(new LegacyMobileToLowendMobileUpgrader("Mobile/Diffuse"));
materialUpgraders.Add(new LegacyMobileToLowendMobileUpgrader("Mobile/Bumped Specular"));
materialUpgraders.Add(new LegacyMobileToLowendMobileUpgrader("Mobile/Bumped Specular(1 Directional Light)"));
materialUpgraders.Add(new LegacyMobileToLowendMobileUpgrader("Mobile/Bumped Diffuse"));
materialUpgraders.Add(new LegacyMobileToLowendMobileUpgrader("Mobile/Unlit (Supports Lightmap)"));
materialUpgraders.Add(new LegacyMobileToLowendMobileUpgrader("Mobile/VertexLit"));
MaterialUpgrader.UpgradeProjectFolder(materialUpgraders, "Upgrade to LD Materials");
}
LegacyMobileToLowendMobileUpgrader(string oldShaderName)
{
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile");
RenameFloat("_Shininess", "_Glossiness");
}
}