Skip to content

Commit dc4ff13

Browse files
authored
Merge pull request #849 from PlayEveryWare/fix/unit-test-settings-window
Fix Unit Test Settings Window
2 parents a266239 + 4bb9788 commit dc4ff13

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Assets/Plugins/Source/Editor/ConfigEditors/ConfigEditor.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,14 @@ public class ConfigEditor<T> : IConfigEditor where T : EpicOnlineServices.Config
7474
/// collapsed, as animating that requires calling the repaint function
7575
/// that is typically called from within EditorWindow.
7676
/// </param>
77-
public ConfigEditor(UnityAction repaintFn = null)
77+
public ConfigEditor(UnityAction repaintFn = null, bool startsExpanded = false)
7878
{
7979
Type configType = typeof(T);
8080

8181
ConfigGroupAttribute attribute = configType.GetCustomAttribute<ConfigGroupAttribute>();
82+
83+
_expanded = startsExpanded;
84+
8285
_animExpanded = new(attribute.Collapsible);
8386

8487
_labelText = attribute.Label;
@@ -112,7 +115,7 @@ private bool Expanded
112115
_expanded = value;
113116
if (_expanded)
114117
{
115-
OnExpanded(this);
118+
OnExpanded?.Invoke(this);
116119
}
117120
}
118121
}
@@ -123,7 +126,7 @@ private bool Expanded
123126
public void Expand()
124127
{
125128
Expanded = true;
126-
OnExpanded(this);
129+
OnExpanded?.Invoke(this);
127130
}
128131

129132
/// <summary>

Assets/Plugins/Source/Editor/EditorWindows/EOSUnitTestSettingsWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static void OpenUnitTestSettingsWindow()
4545

4646
protected override async Task AsyncSetup()
4747
{
48-
_testConfigEditor = new ConfigEditor<UnitTestConfig>();
48+
_testConfigEditor = new ConfigEditor<UnitTestConfig>(Repaint, true);
4949
await _testConfigEditor.LoadAsync();
5050
}
5151

0 commit comments

Comments
 (0)