|
|
|
|
|
|
foreach (Object obj in materials) |
|
|
|
{ |
|
|
|
Material mat = obj as Material; |
|
|
|
if (mat.shader.name == "HDRenderPipeline/InfluenceLayeredLit" || mat.shader.name == "HDRenderPipeline/InfluenceLayeredLitTessellation") |
|
|
|
if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation") |
|
|
|
InfluenceLayeredLitGUI.SynchronizeAllLayers(mat); |
|
|
|
LayeredLitGUI.SynchronizeAllLayers(mat); |
|
|
|
EditorUtility.SetDirty(mat); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
string.Format("{0} / {1} materials cleaned.", i, length), |
|
|
|
i / (float)(length - 1)); |
|
|
|
|
|
|
|
if (mat.shader.name == "HDRenderPipeline/InfluenceLayeredLit" || mat.shader.name == "HDRenderPipeline/InfluenceLayeredLitTessellation") |
|
|
|
if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation") |
|
|
|
InfluenceLayeredLitGUI.SetupMaterialKeywordsAndPass(mat); |
|
|
|
LayeredLitGUI.SetupMaterialKeywordsAndPass(mat); |
|
|
|
EditorUtility.SetDirty(mat); |
|
|
|
} |
|
|
|
else if (mat.shader.name == "HDRenderPipeline/Lit" || mat.shader.name == "HDRenderPipeline/LitTessellation") |
|
|
|
|
|
|
Object[] materials = Resources.FindObjectsOfTypeAll<Material>(); |
|
|
|
|
|
|
|
Shader litShader = Shader.Find("HDRenderPipeline/Lit"); |
|
|
|
Shader layeredLitShader = Shader.Find("HDRenderPipeline/InfluenceLayeredLit"); |
|
|
|
Shader layeredLitShader = Shader.Find("HDRenderPipeline/LayeredLit"); |
|
|
|
|
|
|
|
foreach (Object obj in materials) |
|
|
|
{ |
|
|
|
|
|
|
LitGUI.SetupMaterialKeywordsAndPass(mat); |
|
|
|
EditorUtility.SetDirty(mat); |
|
|
|
} |
|
|
|
else if (mat.shader.name == "HDRenderPipeline/InfluenceLayeredLitTessellation") |
|
|
|
else if (mat.shader.name == "HDRenderPipeline/LayeredLitTessellation") |
|
|
|
InfluenceLayeredLitGUI.SetupMaterialKeywordsAndPass(mat); |
|
|
|
LayeredLitGUI.SetupMaterialKeywordsAndPass(mat); |
|
|
|
EditorUtility.SetDirty(mat); |
|
|
|
} |
|
|
|
} |
|
|
|