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