Skip to content

Commit cdbe8b4

Browse files
committed
Code quality updates
1 parent c0bcccf commit cdbe8b4

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

Editor/SceneSwitcherWindow.cs

+7-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private void OnDisable()
4949
PlayerPrefs.SetString(PrefsKey, JsonUtility.ToJson(_sceneSwitcherData));
5050
}
5151

52-
private bool _editing = false;
52+
private bool _editing;
5353

5454
private void OnGUI()
5555
{
@@ -163,9 +163,10 @@ private void SceneListGui()
163163

164164
GUILayout.EndVertical();
165165

166-
int lineHeight = 18;
166+
const int lineHeight = 18;
167167
if (_editing)
168168
{
169+
//Draw Toggle Buttons
169170
GUILayout.BeginHorizontal();
170171
_sceneSwitcherData.sortRecentToTop = GUILayout.Toggle(_sceneSwitcherData.sortRecentToTop,
171172
new GUIContent("Auto Sort", "Will sort most recently used scenes to the top"),
@@ -176,19 +177,16 @@ private void SceneListGui()
176177
new GUIContent("Close", "Will close/unload other scenes when additive loading is active"),
177178
GUILayout.Height(lineHeight));
178179
GUILayout.EndHorizontal();
179-
}
180-
181-
if (_editing)
182-
{
180+
181+
//Draw Done Button
183182
GUILayout.BeginHorizontal();
184183

185184
GUILayout.FlexibleSpace();
186-
GUI.backgroundColor = _editing ? Color.green : Color.red;
187-
if (GUILayout.Button(_editing ? "Done" : "Edit", GUILayout.MaxWidth(60)))
185+
GUI.backgroundColor = Color.green;
186+
if (GUILayout.Button("Done", GUILayout.MaxWidth(60)))
188187
{
189188
_editing = !_editing;
190189
}
191-
192190
GUI.backgroundColor = Color.white;
193191

194192
GUILayout.EndHorizontal();

Editor/csc.rsp

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-nowarn:CS0649

Editor/csc.rsp.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)