From ee53e116e5817c98b5598eee07b5beedb02e8b2d Mon Sep 17 00:00:00 2001 From: Jason Ma <1312119064@qq.com> Date: Wed, 31 Jul 2024 14:59:27 +0800 Subject: [PATCH] Fix Ramp Property Drawer --- .../LwguiGradientEditor/LwguiGradientEditorHelper.cs | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/UnityEditorExtension/LwguiGradientEditor/LwguiGradientEditorHelper.cs b/UnityEditorExtension/LwguiGradientEditor/LwguiGradientEditorHelper.cs index 18075b2..6253426 100644 --- a/UnityEditorExtension/LwguiGradientEditor/LwguiGradientEditorHelper.cs +++ b/UnityEditorExtension/LwguiGradientEditor/LwguiGradientEditorHelper.cs @@ -12,6 +12,7 @@ public static class LwguiGradientEditorHelper private static readonly int s_LwguiGradientHash = "s_LwguiGradientHash".GetHashCode(); private static int s_LwguiGradientID; + // GradientEditor.DrawGradientWithBackground() public static void DrawGradientWithBackground(Rect position, LwguiGradient gradient, ColorSpace colorSpace, LwguiGradient.ChannelMask viewChannelMask) { Texture2D gradientTexture = gradient.GetPreviewRampTexture(256, 1, colorSpace, viewChannelMask); @@ -23,8 +24,9 @@ public static void DrawGradientWithBackground(Rect position, LwguiGradient gradi GUI.DrawTextureWithTexCoords(r2, backgroundTexture, texCoordsRect, false); // Outline for Gradinet Texture, used to be Frame over texture. - GUI.Box(position, GUIContent.none); - + // LWGUI: GUI.Box() will cause subsequent attributes to be unable to be selected + // GUI.Box(position, GUIContent.none); + // Gradient texture Color oldColor = GUI.color; GUI.color = Color.white; //Dont want the Playmode tint to be applied to gradient textures. diff --git a/package.json b/package.json index 963a8bf..dc84727 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.jasonma.lwgui", - "version": "1.18.1", + "version": "1.18.2", "displayName": "LWGUI", "description": "A Lightweight, Flexible, Powerful Shader GUI System for Unity.", "keywords": [