static void SynchronizeAllLayeredMaterial() { Object[] materials = Resources.FindObjectsOfTypeAll <Material>(); foreach (Object obj in materials) { Material mat = obj as Material; if (mat.shader.name == "HDRenderLoop/LayeredLit") { LayeredLitGUI.SynchronizeAllLayers(mat); } } }
static void SynchronizeAllLayeredMaterial() { var materials = Resources.FindObjectsOfTypeAll <Material>(); foreach (var mat in materials) { if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation") { LayeredLitGUI.SynchronizeAllLayers(mat); EditorUtility.SetDirty(mat); } } }
static void SynchronizeAllLayeredMaterial() { var materials = Resources.FindObjectsOfTypeAll <Material>(); bool VCSEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive); foreach (var mat in materials) { if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation") { CoreEditorUtils.CheckOutFile(VCSEnabled, mat); LayeredLitGUI.SynchronizeAllLayers(mat); EditorUtility.SetDirty(mat); } } }