Skip to content

Commit 5c9f794

Browse files
authored
Merge pull request #62 from arimger/develop
Develop - 0.12.0
2 parents 6bdf326 + ee37110 commit 5c9f794

File tree

53 files changed

+621
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+621
-156
lines changed

Assets/Editor Toolbox/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.12.0 [10.12.2022]
2+
3+
### Changed:
4+
- UX improvements for the ScriptableObjectCreationWizard
5+
- New API for drawing custom Editors (check HOWTO.md for more details)
6+
- Fix label drawing while using the [ReferencePickerAttribute]
7+
- Fix searching for private methods in base classes while using the [EditorButtonAttribute]
8+
- Fix minor issues while using conditional drawers during multi-selection
9+
- Fix minor issues while using the [TitleAttribute] in groups
10+
111
## 0.11.9 [22.10.2022]
212

313
### Added:

Assets/Editor Toolbox/Editor/Drawers/Helpers/Extraction/ValueExtractionHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static class ValueExtractionHelper
99
{
1010
private static readonly Func<object, object, bool> defaultComparer = (o1, o2) =>
1111
{
12-
return o1.Equals(o2);
12+
return o1 == o2;
1313
};
1414

1515
private static readonly List<IValueExtractor> extractors = new List<IValueExtractor>()

Assets/Editor Toolbox/Editor/Drawers/Regular/SerializedSceneDrawer.cs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ public class SerializedSceneDrawer : PropertyDrawerBase
1010
private bool HasSceneDetails(SerializedProperty property)
1111
{
1212
var sceneProperty = property.FindPropertyRelative("sceneReference");
13-
return attribute != null && sceneProperty.objectReferenceValue;
13+
return attribute != null && attribute is SceneDetailsAttribute && sceneProperty.objectReferenceValue;
1414
}
1515

16-
private void DrawIncludedSceneDetails(Rect position, SceneData sceneData)
16+
private void DrawSceneDetails(Rect position, SceneData sceneData)
1717
{
1818
EditorGUI.BeginDisabledGroup(true);
1919
var spacing = EditorGUIUtility.standardVerticalSpacing;
@@ -23,19 +23,6 @@ private void DrawIncludedSceneDetails(Rect position, SceneData sceneData)
2323
EditorGUI.EndDisabledGroup();
2424
}
2525

26-
private void DrawRejectedSceneDetails(Rect position, SceneData sceneData)
27-
{
28-
EditorGUI.BeginDisabledGroup(true);
29-
var spacing = EditorGUIUtility.standardVerticalSpacing;
30-
EditorGUI.LabelField(position, Style.notInBuildContent);
31-
position.y += EditorGUIUtility.singleLineHeight + spacing;
32-
EditorGUI.EndDisabledGroup();
33-
if (GUI.Button(position, Style.showDetailsContent))
34-
{
35-
OpenBuildSettings();
36-
}
37-
}
38-
3926
private void OpenBuildSettings()
4027
{
4128
EditorWindow.GetWindow(typeof(BuildPlayerWindow));
@@ -69,11 +56,18 @@ protected override void OnGUISafe(Rect position, SerializedProperty property, GU
6956
position.y += EditorGUIUtility.singleLineHeight + spacing;
7057
if (sceneData.inBuild)
7158
{
72-
DrawIncludedSceneDetails(position, sceneData);
59+
DrawSceneDetails(position, sceneData);
7360
}
7461
else
7562
{
76-
DrawRejectedSceneDetails(position, sceneData);
63+
EditorGUI.BeginDisabledGroup(true);
64+
EditorGUI.LabelField(position, Style.notInBuildContent);
65+
position.y += EditorGUIUtility.singleLineHeight + spacing;
66+
EditorGUI.EndDisabledGroup();
67+
if (GUI.Button(position, Style.showDetailsContent))
68+
{
69+
OpenBuildSettings();
70+
}
7771
}
7872
}
7973

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/BeginGroupAttributeDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class BeginGroupAttributeDrawer : ToolboxDecoratorDrawer<BeginGroupAttrib
77
{
88
protected override void OnGuiBeginSafe(BeginGroupAttribute attribute)
99
{
10-
ToolboxLayoutHelper.BeginVertical(Style.groupBackgroundStyle);
10+
ToolboxLayoutHandler.BeginVertical(Style.groupBackgroundStyle);
1111
if (attribute.HasLabel)
1212
{
1313
GUILayout.Label(attribute.Label, EditorStyles.boldLabel);

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/BeginHorizontalAttributeDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ protected override void OnGuiBeginSafe(BeginHorizontalAttribute attribute)
1313
EditorGUIUtility.fieldWidth = width * attribute.FieldToWidthRatio;
1414

1515
//begin horizontal group using internal utility
16-
ToolboxLayoutHelper.BeginHorizontal();
16+
ToolboxLayoutHandler.BeginHorizontal();
1717
}
1818
}
1919
}

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/BeginHorizontalGroupAttributeDrawer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ protected override void OnGuiBeginSafe(BeginHorizontalGroupAttribute attribute)
3737
EditorGUIUtility.labelWidth = fixedWidth * attribute.LabelToWidthRatio;
3838
EditorGUIUtility.fieldWidth = fixedWidth * attribute.FieldToWidthRatio;
3939

40-
ToolboxLayoutHelper.BeginVertical(Style.groupBackgroundStyle);
40+
ToolboxLayoutHandler.BeginVertical(Style.groupBackgroundStyle);
4141
if (attribute.HasLabel)
4242
{
4343
GUILayout.Label(attribute.Label, EditorStyles.boldLabel);
4444
}
4545

4646
HandleScrollView(fixedHeight);
47-
ToolboxLayoutHelper.BeginHorizontal();
47+
ToolboxLayoutHandler.BeginHorizontal();
4848
}
4949

5050

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/BeginVerticalAttributeDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class BeginVerticalAttributeDrawer : ToolboxDecoratorDrawer<BeginVertical
66
{
77
protected override void OnGuiBeginSafe(BeginVerticalAttribute attribute)
88
{
9-
ToolboxLayoutHelper.BeginVertical();
9+
ToolboxLayoutHandler.BeginVertical();
1010
}
1111
}
1212
}

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/EndGroupAttributeDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class EndGroupAttributeDrawer : ToolboxDecoratorDrawer<EndGroupAttribute>
66
{
77
protected override void OnGuiCloseSafe(EndGroupAttribute attribute)
88
{
9-
ToolboxLayoutHelper.CloseVertical();
9+
ToolboxLayoutHandler.CloseVertical();
1010
}
1111
}
1212
}

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/EndHorizontalAttributeDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class EndHorizontalAttributeDrawer : ToolboxDecoratorDrawer<EndHorizontal
88
protected override void OnGuiCloseSafe(EndHorizontalAttribute attribute)
99
{
1010
//end horizontal group
11-
ToolboxLayoutHelper.CloseHorizontal();
11+
ToolboxLayoutHandler.CloseHorizontal();
1212

1313
//restore label & field
1414
EditorGUIUtility.labelWidth = 0.0f;

Assets/Editor Toolbox/Editor/Drawers/Toolbox/Decorator/EndHorizontalGroupAttributeDrawer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ public class EndHorizontalGroupAttributeDrawer : ToolboxDecoratorDrawer<EndHoriz
77
{
88
protected override void OnGuiCloseSafe(EndHorizontalGroupAttribute attribute)
99
{
10-
ToolboxLayoutHelper.CloseHorizontal();
10+
ToolboxLayoutHandler.CloseHorizontal();
1111
EditorGUILayout.EndScrollView();
12-
ToolboxLayoutHelper.CloseVertical();
12+
ToolboxLayoutHandler.CloseVertical();
1313

1414
EditorGUIUtility.labelWidth = 0.0f;
1515
EditorGUIUtility.fieldWidth = 0.0f;

0 commit comments

Comments
 (0)