Skip to content

Commit c94c30e

Browse files
committed
Minor fixes
1 parent 88c1a41 commit c94c30e

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

Runtime/Common/LootLockerConfig.cs

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static LootLockerConfig Get()
6060
{
6161
settingsInstance = ProjectSettingsHelper.Load<LootLockerConfig>(path);
6262
}
63-
63+
6464
settingsInstance.hideFlags = HideFlags.HideAndDontSave;
6565
return settingsInstance;
6666
#else
@@ -91,34 +91,31 @@ public static LootLockerConfig current
9191
}
9292
}
9393

94-
public string apiKey;
95-
[HideInInspector]
96-
public string token;
94+
public string apiKey;
9795
[HideInInspector]
98-
public int gameID;
99-
public string game_version = "1.0";
96+
public string token;
10097
[HideInInspector]
101-
public string deviceID = "defaultPlayerId";
98+
public int gameID;
99+
public string game_version = "1.0";
102100
[HideInInspector]
103-
public string email, password;
104-
public platformType platform;
105-
public environmentType environment;
106-
public enum environmentType { Development, Live }
107-
public enum platformType { android, ios, Steam, Windows }
108-
public bool developmentMode => environment == environmentType.Development ? true : false;
101+
public string deviceID = "defaultPlayerId";
102+
public platformType platform;
103+
public enum platformType { Android, iOS, Steam, Windows, GoG, Xbox, PlayStationNetwork, EpicStore, NintendoSwitch, Web ,Other }
104+
105+
public bool developmentMode;
109106
[HideInInspector]
110-
public string url = "https://api.lootlocker.io/game/v1";
107+
public string url = "https://api.lootlocker.io/game/v1";
111108
[HideInInspector]
112-
public string adminUrl = "https://api.lootlocker.io/admin";
109+
public string adminUrl = "https://api.lootlocker.io/admin";
113110
[HideInInspector]
114-
public string playerUrl = "https://api.lootlocker.io/player";
111+
public string playerUrl = "https://api.lootlocker.io/player";
115112
[HideInInspector]
116-
public string userUrl = "https://api.lootlocker.io/game";
113+
public string userUrl = "https://api.lootlocker.io/game";
117114
public enum DebugLevel { All, ErrorOnly, NormalOnly, Off }
118-
public DebugLevel currentDebugLevel;
119-
public bool allowTokenRefresh = true;
115+
public DebugLevel currentDebugLevel;
116+
public bool allowTokenRefresh = true;
120117

121-
public void UpdateToken(string _token, string _player_identifier)
118+
public void UpdateToken(string _token, string _player_identifier)
122119
{
123120
token = _token;
124121
deviceID = _player_identifier;

Runtime/Editor/ProjectSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ private void DrawGameSettings()
6565
gameSettings.EditorSave();
6666
}
6767

68-
LootLockerConfig.environmentType environment = gameSettings.environment;
68+
bool onDevelopmentMode = gameSettings.developmentMode;
6969
EditorGUI.BeginChangeCheck();
70-
environment = (LootLockerConfig.environmentType)EditorGUILayout.EnumPopup("Environment", environment);
70+
onDevelopmentMode = EditorGUILayout.Toggle("On Development Mode", onDevelopmentMode);
7171
if (EditorGUI.EndChangeCheck())
7272
{
73-
gameSettings.environment = environment;
73+
gameSettings.developmentMode = onDevelopmentMode;
7474
gameSettings.EditorSave();
7575
}
7676

Runtime/Game/Requests/LootLockerSessionRequest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static void Session(LootLockerGetRequest data, Action<LootLockerSessionRe
6868
{
6969
LootLockerSDKManager.DebugMessage(serverResponse.text);
7070
response = JsonConvert.DeserializeObject<LootLockerSessionResponse>(serverResponse.text);
71+
response.text = serverResponse.text;
7172
LootLockerConfig.current.UpdateToken(response.session_token, (data as LootLockerSessionRequest)?.player_identifier);
7273
onComplete?.Invoke(response);
7374
}
@@ -93,6 +94,7 @@ public static void EndSession(LootLockerGetRequest data, Action<LootLockerSessio
9394
if (string.IsNullOrEmpty(serverResponse.Error))
9495
{
9596
LootLockerSDKManager.DebugMessage(serverResponse.text);
97+
response.text = serverResponse.text;
9698
response = JsonConvert.DeserializeObject<LootLockerSessionResponse>(serverResponse.text);
9799
onComplete?.Invoke(response);
98100
}

0 commit comments

Comments
 (0)