Skip to content

Commit 70868a3

Browse files
authored
Task/1127 standerd folding header (unity3d-jp#119)
* * Renamed Basic Shader Settings to Shader Setting. * Replaced folder header to use Unity standard style. [skip ci] * * Replaced folder header to use Unity standard style in the inspector window. * Replaced '【DX11 Phong Tessellation Settings】' to 'Legacy Pipeline: Phong Tessellation Settings' as it works on Mac. * The titles of the items in the Inspector window, which were not always consistent, such as "Setup" and "Settings," are now consistent with "Settings.* Renamed Shader GUI class and mede them integrated before integrate all the render pipeline shaders. All the render pipeline shaders use one Custom Editor class. * Removed 【】in the Inspector window.
1 parent 6012f9f commit 70868a3

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

com.unity.toonshader/CHANGELOG.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
# Changelog
2-
## [0.7.0-preview] - 2022-03-06
3-
### Added:
4-
* Legacy: Graphics Test 2022.2
2+
## [0.7.0-preview] - 2022-03-07
53
### Updated:
64
* Shader version properties in all the render pipeline shaders.
75
* Updated installation.md.
86
* Replaced toggle buttons Off/Active UI to Unity standard toggle.
7+
* Renamed Basic Shader Settings to Shader Setting.
98
* Replaced some toggle buttons, such as Emissive UV Coord, Specular Mode, to dropdown menus
109
* Made everything in the inspector hidden when disabled to be shown but grayed out.
11-
* Renamed Shader GUI class and mede them itegrated before integrate all the render pipeline shaders. All the render pipeline shaders use the same UI class.
12-
13-
10+
* Replaced folder header to use Unity standard style in the inspector window.
11+
* Replaced '【DX11 Phong Tessellation Settings】' to 'Legacy Pipeline: Phong Tessellation Settings' as it works on Mac.
12+
* The titles of the items in the Inspector window, which were not always consistent, such as "Setup" and "Settings," are now consistent with "Settings.* Renamed Shader GUI class and mede them integrated before integrate all the render pipeline shaders. All the render pipeline shaders use one Custom Editor class.
13+
* Removed 【】in the Inspector window.
14+
### Added:
15+
* Legacy: Graphics Test 2022.2.
16+
* Uninversal RP: Graphics Test 2022.2.
17+
* HDRP: Graphics Test 2022.2.
1418
### Removed:
1519
* Removed Game Recommendation window and changed the default values of shader variables.
1620
* Removed Simple UI.
1721
* Removed Japanese and English manual link buttons.
22+
### Fixed:
23+
* Undo/Redo was not working on some itemes in the inspector window.
1824

1925
## [0.6.1-preview] - 2022-02-24
2026
### Fixed:

com.unity.toonshader/Editor/UTS3GUI.cs

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ static void Line()
896896

897897
protected static bool Foldout(bool display, string title)
898898
{
899+
#if USE_TOGGLE_BUTTONS
899900
var style = new GUIStyle("ShurikenModuleTitle");
900901
style.font = new GUIStyle(EditorStyles.boldLabel).font;
901902
style.border = new RectOffset(15, 7, 4, 4);
@@ -920,10 +921,14 @@ protected static bool Foldout(bool display, string title)
920921
}
921922

922923
return display;
924+
#else
925+
return EditorGUILayout.Foldout(display, title, true );
926+
#endif
923927
}
924928

925929
static bool FoldoutSubMenu(bool display, string title)
926930
{
931+
#if USE_TOGGLE_BUTTONS
927932
var style = new GUIStyle("ShurikenModuleTitle");
928933
style.font = new GUIStyle(EditorStyles.boldLabel).font;
929934
style.border = new RectOffset(15, 7, 4, 4);
@@ -949,6 +954,9 @@ static bool FoldoutSubMenu(bool display, string title)
949954
}
950955

951956
return display;
957+
#else
958+
return EditorGUILayout.Foldout(display, title, true);
959+
#endif
952960
}
953961

954962

@@ -958,9 +966,9 @@ static bool FoldoutSubMenu(bool display, string title)
958966
//Specify only those that use the m_MaterialEditor method as their UI. For specifying textures and colors on a single line.
959967
private static class Styles
960968
{
961-
public static GUIContent baseColorText = new GUIContent("BaseMap", "Base Color : Texture(sRGB) × Color(RGB) Default:White");
962-
public static GUIContent firstShadeColorText = new GUIContent("1st ShadeMap", "1st ShadeColor : Texture(sRGB) × Color(RGB) Default:White");
963-
public static GUIContent secondShadeColorText = new GUIContent("2nd ShadeMap", "2nd ShadeColor : Texture(sRGB) × Color(RGB) Default:White");
969+
public static GUIContent baseColorText = new GUIContent("Base Map", "Base Color : Texture(sRGB) × Color(RGB) Default:White");
970+
public static GUIContent firstShadeColorText = new GUIContent("1st Shading Map", "1st ShadeColor : Texture(sRGB) × Color(RGB) Default:White");
971+
public static GUIContent secondShadeColorText = new GUIContent("2nd Shading Map", "2nd ShadeColor : Texture(sRGB) × Color(RGB) Default:White");
964972
public static GUIContent normalMapText = new GUIContent("NormalMap", "NormalMap : Texture(bump)");
965973
public static GUIContent highColorText = new GUIContent("HighColor", "High Color : Texture(sRGB) × Color(RGB) Default:Black");
966974
public static GUIContent highColorMaskText = new GUIContent("HighColor Mask", "HighColor Mask : Texture(linear)");
@@ -1074,7 +1082,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
10741082

10751083

10761084

1077-
_BasicShaderSettings_Foldout = Foldout(_BasicShaderSettings_Foldout, "Basic Shader Settings");
1085+
_BasicShaderSettings_Foldout = Foldout(_BasicShaderSettings_Foldout, "Shader Settings");
10781086
if (_BasicShaderSettings_Foldout)
10791087
{
10801088
EditorGUI.indentLevel++;
@@ -1117,7 +1125,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
11171125

11181126
EditorGUILayout.Space();
11191127

1120-
_BasicThreeColors_Foldout = Foldout(_BasicThreeColors_Foldout, "Basic Three Colors and Control Maps Setups】");
1128+
_BasicThreeColors_Foldout = Foldout(_BasicThreeColors_Foldout, "3 Basic Color and Control Map Settings");
11211129
if (_BasicThreeColors_Foldout)
11221130
{
11231131
EditorGUI.indentLevel++;
@@ -1128,7 +1136,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
11281136

11291137
EditorGUILayout.Space();
11301138

1131-
_StepAndFeather_Foldout = Foldout(_StepAndFeather_Foldout, "Basic Lookdevs : Shading Step and Feather Settings");
1139+
_StepAndFeather_Foldout = Foldout(_StepAndFeather_Foldout, "Basic Lookdevs : Shading Step and Feather Settings");
11321140
if (_StepAndFeather_Foldout)
11331141
{
11341142
EditorGUI.indentLevel++;
@@ -1139,7 +1147,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
11391147

11401148
EditorGUILayout.Space();
11411149

1142-
_HighColor_Foldout = Foldout(_HighColor_Foldout, "【HighColor Settings");
1150+
_HighColor_Foldout = Foldout(_HighColor_Foldout, "High Color Settings");
11431151
if (_HighColor_Foldout)
11441152
{
11451153
EditorGUI.indentLevel++;
@@ -1154,7 +1162,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
11541162

11551163
EditorGUILayout.Space();
11561164

1157-
_RimLight_Foldout = Foldout(_RimLight_Foldout, "【RimLight Settings");
1165+
_RimLight_Foldout = Foldout(_RimLight_Foldout, "Rim Light Settings");
11581166
if (_RimLight_Foldout)
11591167
{
11601168
EditorGUI.indentLevel++;
@@ -1165,7 +1173,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
11651173

11661174
EditorGUILayout.Space();
11671175

1168-
_MatCap_Foldout = Foldout(_MatCap_Foldout, "MatCap : Texture Projection Settings");
1176+
_MatCap_Foldout = Foldout(_MatCap_Foldout, "MatCap Settings");
11691177
if (_MatCap_Foldout)
11701178
{
11711179
EditorGUI.indentLevel++;
@@ -1190,7 +1198,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
11901198
EditorGUILayout.Space();
11911199
}
11921200

1193-
_Emissive_Foldout = Foldout(_Emissive_Foldout, "【Emissive : Self-luminescence Settings");
1201+
_Emissive_Foldout = Foldout(_Emissive_Foldout, "Emission Settings");
11941202
if (_Emissive_Foldout)
11951203
{
11961204
EditorGUI.indentLevel++;
@@ -1205,7 +1213,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
12051213
if (material.HasProperty(ShaderPropOutline) && _Transparent_Setting != _UTS_Transparent.On)
12061214
{
12071215
SetuOutline(material);
1208-
_Outline_Foldout = Foldout(_Outline_Foldout, "Outline Settings");
1216+
_Outline_Foldout = Foldout(_Outline_Foldout, "Outline Settings");
12091217
if (_Outline_Foldout)
12101218
{
12111219
EditorGUI.indentLevel++;
@@ -1219,9 +1227,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
12191227
{
12201228
SetupOverDrawTransparentObject(material);
12211229
}
1222-
if (material.HasProperty("_TessEdgeLength"))
1230+
if (material.HasProperty("_TessEdgeLength") && currentRenderPipeline == RenderPipeline.Legacy)
12231231
{
1224-
_Tessellation_Foldout = Foldout(_Tessellation_Foldout, "【DX11 Phong Tessellation Settings");
1232+
_Tessellation_Foldout = Foldout(_Tessellation_Foldout, "Legacy Pipeline: Phong Tessellation Settings");
12251233
if (_Tessellation_Foldout)
12261234
{
12271235
EditorGUI.indentLevel++;
@@ -1235,7 +1243,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
12351243

12361244
if (!_SimpleUI)
12371245
{
1238-
_LightColorContribution_Foldout = Foldout(_LightColorContribution_Foldout, "【LightColor Contribution to Materials】");
1246+
_LightColorContribution_Foldout = Foldout(_LightColorContribution_Foldout, "Light Color Contribution to Material Settings");
12391247
if (_LightColorContribution_Foldout)
12401248
{
12411249
EditorGUI.indentLevel++;
@@ -1246,7 +1254,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro
12461254

12471255
EditorGUILayout.Space();
12481256

1249-
_AdditionalLightingSettings_Foldout = Foldout(_AdditionalLightingSettings_Foldout, "Environmental Lighting Contributions Setups】");
1257+
_AdditionalLightingSettings_Foldout = Foldout(_AdditionalLightingSettings_Foldout, "Environmental Lighting Contribution Settings");
12501258
if (_AdditionalLightingSettings_Foldout)
12511259
{
12521260
EditorGUI.indentLevel++;
@@ -1790,7 +1798,7 @@ void GUI_BasicThreeColors(Material material)
17901798
m_MaterialEditor.TexturePropertySingleLine(Styles.normalMapText, normalMap, bumpScale);
17911799
m_MaterialEditor.TextureScaleOffsetProperty(normalMap);
17921800

1793-
//EditorGUI.indentLevel++;
1801+
EditorGUI.indentLevel++;
17941802

17951803
GUILayout.Label("NormalMap Effectiveness", EditorStyles.boldLabel);
17961804
#if USE_TOGGLE_BUTTONS
@@ -1852,11 +1860,11 @@ void GUI_BasicThreeColors(Material material)
18521860
EditorGUILayout.EndHorizontal();
18531861
#else
18541862
GUI_Toggle(material, "3 Basic Colors", ShaderPropIs_NormalMapToBase, MaterialGetInt(material, ShaderPropIs_NormalMapToBase) != 0);
1855-
GUI_Toggle(material, "HighColor", ShaderPropNormalMapToHighColor, MaterialGetInt(material, ShaderPropNormalMapToHighColor) != 0);
1856-
GUI_Toggle(material, "RimLight", ShaderPropIsNormalMapToRimLight, MaterialGetInt(material, ShaderPropIsNormalMapToRimLight) != 0);
1863+
GUI_Toggle(material, "High Color", ShaderPropNormalMapToHighColor, MaterialGetInt(material, ShaderPropNormalMapToHighColor) != 0);
1864+
GUI_Toggle(material, "Rim Light", ShaderPropIsNormalMapToRimLight, MaterialGetInt(material, ShaderPropIsNormalMapToRimLight) != 0);
18571865

18581866
#endif
1859-
//EditorGUI.indentLevel--;
1867+
EditorGUI.indentLevel--;
18601868
EditorGUILayout.Space();
18611869
}
18621870

@@ -3846,7 +3854,7 @@ internal void GUI_GameRecommendation(Material material, EditorWindow window)
38463854
}
38473855
void GUI_LightColorContribution(Material material)
38483856
{
3849-
GUILayout.Label("Realtime LightColor Contribution to each color", EditorStyles.boldLabel);
3857+
GUILayout.Label("Realtime Light Color Contribution to each color", EditorStyles.boldLabel);
38503858
#if USE_TOGGLE_BUTTONS
38513859
EditorGUILayout.BeginHorizontal();
38523860
EditorGUILayout.PrefixLabel("Base Color");
@@ -4026,8 +4034,8 @@ void GUI_LightColorContribution(Material material)
40264034
}
40274035
#else
40284036
GUI_Toggle(material, "Base Color", ShaderPropIsLightColor_Base, MaterialGetInt(material, ShaderPropIsLightColor_Base)!= 0);
4029-
GUI_Toggle(material, "1st Shade Color", ShaderPropIs_LightColor_1st_Shade, MaterialGetInt(material, ShaderPropIs_LightColor_1st_Shade) != 0);
4030-
GUI_Toggle(material, "2nd Shade Color", ShaderPropIs_LightColor_2nd_Shade, MaterialGetInt(material, ShaderPropIs_LightColor_2nd_Shade) != 0);
4037+
GUI_Toggle(material, "1st Shading Color", ShaderPropIs_LightColor_1st_Shade, MaterialGetInt(material, ShaderPropIs_LightColor_1st_Shade) != 0);
4038+
GUI_Toggle(material, "2nd Shading Color", ShaderPropIs_LightColor_2nd_Shade, MaterialGetInt(material, ShaderPropIs_LightColor_2nd_Shade) != 0);
40314039
GUI_Toggle(material, "High Color", ShaderPropIs_LightColor_HighColor, MaterialGetInt(material, ShaderPropIs_LightColor_HighColor) != 0);
40324040
GUI_Toggle(material, "Rim Light", ShaderPropIs_LightColor_RimLight, MaterialGetInt(material, ShaderPropIs_LightColor_RimLight) != 0);
40334041
GUI_Toggle(material, "Ap_RimLight", ShaderPropIs_LightColor_Ap_RimLight, MaterialGetInt(material, ShaderPropIs_LightColor_Ap_RimLight) != 0);

0 commit comments

Comments
 (0)