From d1440654c612cd450e7672b0af89373eebd7eae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Leone=20G=C3=A1mez?= Date: Fri, 8 Jul 2022 06:28:02 +0200 Subject: [PATCH 1/2] Match material property size with Unity's defaults --- Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs b/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs index 0700ad9..5f36ffc 100644 --- a/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs +++ b/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs @@ -28,6 +28,8 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro { Initialize(materialEditor, properties); + materialEditor.SetDefaultGUIWidths(); + layoutController.Begin(); for (int i = 0; i < properties.Length; i++) { From 2f47d25ee30b4e44d49c541461e61e3493a8b57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Leone?= Date: Sat, 9 Jul 2022 01:01:56 +0200 Subject: [PATCH 2/2] Added default Unity fields "Render Queue", "Enable GPU Instancing" and "Double Sided Global Illumination" --- Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs b/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs index 5f36ffc..7c96ee0 100644 --- a/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs +++ b/Assets/MarkupAttributes/Core/Editor/MarkedUpShaderGUI.cs @@ -55,6 +55,12 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro } } layoutController.Finish(); + + if (UnityEngine.Rendering.SupportedRenderingFeatures.active.editableMaterialRenderQueue) { + materialEditor.RenderQueueField(); + } + materialEditor.EnableInstancingField(); + materialEditor.DoubleSidedGIField(); } private void Initialize(MaterialEditor materialEditor, MaterialProperty[] properties)