Skip to content

Commit cd45d1c

Browse files
committed
Change LWGUI Context Menu Order
Update RM
1 parent ff69045 commit cd45d1c

File tree

6 files changed

+44
-3
lines changed

6 files changed

+44
-3
lines changed

Editor/ScriptableObject/ShaderPropertyPreset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace LWGUI
99
{
10-
[CreateAssetMenu(fileName = "LWGUI_ShaderPropertyPreset.asset", menuName = "LWGUI/Shader Property Preset")]
10+
[CreateAssetMenu(fileName = "LWGUI_ShaderPropertyPreset.asset", menuName = "LWGUI/Shader Property Preset", order = 84)]
1111
public class ShaderPropertyPreset : ScriptableObject
1212
{
1313
public enum PropertyType

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Having been validated through numerous large-scale commercial projects, employin
7070
* [Custom Header and Footer](#custom-header-and-footer)
7171
* [Custom Drawer](#custom-drawer)
7272
* [Contribution](#contribution)
73-
<!--te-->
73+
<!--te-->
7474

7575

7676
## Installation
@@ -445,6 +445,28 @@ Result:
445445

446446
Default display settings can be set using the LwguiGradientUsage() Attribute.
447447

448+
449+
##### Gradient Editor
450+
451+
The new LWGUI Gradient Editor integrates with Unity's built-in [Gradient Editor](https://docs.unity3d.com/Manual/EditingValueProperties.html) and [Curve Editor](https://docs.unity3d.com/Manual/EditingCurves.html), enabling more powerful features than UE's Gradient Editor.
452+
453+
![image-20241126110012922](./assets/image-20241126110012922.png)
454+
455+
| Editor | Description |
456+
| --------------------- | ------------------------------------------------------------ |
457+
| Time Range | The display range of the horizontal axis, selectable from 0-1 / 0-24 / 0-2400, is very useful when the horizontal axis is time. Note that only the display is affected, the actual value stored in the horizontal axis is always 0-1. |
458+
| Channels | The channels displayed. Can be displayed individually. |
459+
| sRGB Preview | It should be checked when the value of Gradient is a color to preview the correct color, otherwise it doesn't need to be checked. Only affects the display, Gradient and Ramp Map are always stored as Linear. |
460+
| Value / R / G / B / A | Used to edit the Value of the selected Key, you can edit the Value of multiple Keys at the same time. |
461+
| Time | Used to edit the Time of the selected Key, you can edit the Time of multiple Keys at the same time. If you enter a number manually, you must **press enter** to end the editing. |
462+
| Gradient Editor | This is similar to Unity's built-in [Gradient Editor](https://docs.unity3d.com/Manual/EditingValueProperties.html), but the Alpha channels are separated into black and white. <br/>Note that **adding keys from the Gradient Editor is limited to a maximum of 8 keys**, adding keys from the Curve Editor is **unlimited**. Exceeding the key limit will not affect preview or usage. |
463+
| Curve Editor | Similar to Unity's built-in Curve Editor, it displays the XY 0-1 range by default, and you can use the scroll wheel to zoom or move the display range.<br/>As you can see in the image below, the context menu has a number of functions for controlling the shape of the curve, and you can consult the [Unity documentation](https://docs.unity3d.com/Manual/EditingCurves.html) to get the most out of these functions. |
464+
| Presets | You can save the current LWGUI Gradient as a preset and apply it anytime. These presets are common between different engine versions on the local computer, but are not saved to the project. |
465+
466+
![image-20241126105823397](./assets/image-20241126105823397.png)![image-20241126112320151](./assets/image-20241126112320151.png)
467+
468+
469+
448470
**Known issues:**
449471

450472
- Preview images below Unity 2022 have no difference between sRGB/Linear color spaces

README_CN.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* [Custom Header and Footer](#custom-header-and-footer)
7070
* [Custom Drawer](#custom-drawer)
7171
* [Contribution](#contribution)
72-
<!--te-->
72+
<!--te-->
7373

7474

7575
## Installation
@@ -444,6 +444,25 @@ Result:
444444

445445
可以使用LwguiGradientUsage() Attribute设置默认的显示设置.
446446

447+
##### Gradient Editor
448+
449+
新的LWGUI Gradient Editor集成了Unity内置的[Gradient Editor](https://docs.unity3d.com/Manual/EditingValueProperties.html)[Curve Editor](https://docs.unity3d.com/Manual/EditingCurves.html), 实现了比UE的Gradient Editor更加强大的功能.
450+
451+
![image-20241126110012922](./assets/image-20241126110012922.png)
452+
453+
| 编辑器 | 解释 |
454+
| --------------------- | ------------------------------------------------------------ |
455+
| Time Range | 横轴的显示范围, 可以选择0-1 / 0-24 / 0-2400, 当横轴为时间时非常有用. 注意, 只影响显示, 横轴实际存储的值始终为0-1. |
456+
| Channels | 显示的通道, 可以单独只显示某些通道. |
457+
| sRGB Preview | 当Gradient的值为颜色时应该勾选以预览正确的颜色, 否则不需要勾选. 只影响显示, Gradient和Ramp Map存储的值始终为Linear. |
458+
| Value / R / G / B / A | 用于编辑已选中的Key的Value, 可以同时编辑多个Key的Value. |
459+
| Time | 用于编辑已选中的Key的Time, 可以同时编辑多个Key的Time. 如果手动输入数字, 必须要**按回车**以结束编辑. |
460+
| Gradient Editor | 类似于Unity内置的[Gradient Editor](https://docs.unity3d.com/Manual/EditingValueProperties.html), 但是将Alpha通道分离显示为黑白.<br/>注意, **从Gradient Editor添加Key时会受到最多8个Key的限制**, 从Curve Editor添加Key则数量**不受限制**. Key的数量超过限制不会影响预览和使用. |
461+
| Curve Editor | 类似于Unity内置的Curve Editor, 默认显示XY 0-1的范围, 你可以用滚轮缩放或移动显示范围.<br/>如下图所示, 右键菜单中有大量控制曲线形态的功能, 你可以查阅[Unity文档](https://docs.unity3d.com/Manual/EditingCurves.html)以充分利用这些功能. |
462+
| Presets | 你可以保存当前LWGUI Gradient为预设, 并随时调用这些预设. 这些预设在本地计算机的不同引擎版本之间通用, 但不会保存到项目中. |
463+
464+
![image-20241126105823397](./assets/image-20241126105823397.png)![image-20241126112320151](./assets/image-20241126112320151.png)
465+
447466
**已知问题:**
448467

449468
- Unity 2022以下的预览图像在sRGB/Linear颜色空间之间没有区别

assets/image-20241126105823397.png

55.9 KB
Loading

assets/image-20241126110012922.png

25.4 KB
Loading

assets/image-20241126112320151.png

42.8 KB
Loading

0 commit comments

Comments
 (0)