File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Assets/Plugins/Source/Editor Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments