Skip to content

Commit 22dc8b4

Browse files
committed
chore: synced unity from 'feat: allow for editing settings with GameJolt disabled'
1 parent cc6772f commit 22dc8b4

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Unity/Packages/se.hertzole.gamejolt.net/Editor/GameJoltSettingsProvider.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if !DISABLE_GAMEJOLT // Disables all GameJolt-related code
2-
3-
#if UNITY_EDITOR
1+
#if UNITY_EDITOR
42
using System.Collections.Generic;
53
using UnityEditor;
64
using UnityEngine;
@@ -57,6 +55,11 @@ public override void OnGUI(string searchContext)
5755
float oLabelWidth = EditorGUIUtility.labelWidth;
5856
EditorGUIUtility.labelWidth = 250;
5957

58+
#if DISABLE_GAMEJOLT
59+
EditorGUILayout.HelpBox("GameJolt is current disabled due to the DISABLE_GAMEJOLT define.", MessageType.Warning);
60+
EditorGUILayout.Space();
61+
#endif
62+
6063
GUILayout.Label(Labels.gameSettings, EditorStyles.boldLabel);
6164
int field = EditorGUILayout.IntField(Labels.gameId, GameJoltSettings.GameId);
6265

@@ -78,8 +81,9 @@ public override void OnGUI(string searchContext)
7881

7982
EditorGUILayout.Space();
8083
GUILayout.Label(Labels.editorSettings, EditorStyles.boldLabel);
81-
82-
EditorGUILayout.HelpBox("These settings are only used in the editor and will only be saved for you. They are not shared with anyone else.", MessageType.Info);
84+
85+
EditorGUILayout.HelpBox("These settings are only used in the editor and will only be saved for you. They are not shared with anyone else.",
86+
MessageType.Info);
8387

8488
GameJoltSettings.AutoSignIn = EditorGUILayout.Toggle(Labels.autoSignIn, GameJoltSettings.AutoSignIn);
8589
bool oEnabled = GUI.enabled;
@@ -116,5 +120,4 @@ private static SettingsProvider CreateProvider()
116120
}
117121
}
118122
}
119-
#endif
120-
#endif // DISABLE_GAMEJOLT
123+
#endif // UNITY_EDITOR

0 commit comments

Comments
 (0)