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

27 行
1002 B

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Experimental.Rendering;
using UnityEngine;
public class StandardSpecularToLDMaterialUpgrader : MaterialUpgrader
{
[MenuItem("LDRenderPipeline/Upgrade Materials")]
private static void UpgradeMaterialsToLD()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();
upgraders.Add(new StandardSpecularToLDMaterialUpgrader("Standard (Specular setup)"));
upgraders.Add(new StandardSpecularToLDMaterialUpgrader("Standard"));
upgraders.Add(new StandardSpecularToLDMaterialUpgrader("TerrainSurface"));
MaterialUpgrader.UpgradeProjectFolder(upgraders, "Upgrade to LD Materials");
}
StandardSpecularToLDMaterialUpgrader(string oldShaderName)
{
RenameShader(oldShaderName, "RenderLoop/LowEnd");
RemoveTexture("_OcclusionMap");
RemoveTexture("_DetailAlbedoMap");
RemoveTexture("_DetailNormalMap");
}
}