Skip to content

Commit 1bc81ea

Browse files
committed
Added new overload for steam calls with the right name and made some more cdebug calls only happen in the editor
1 parent 726e071 commit 1bc81ea

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Assets/LootLocker/Common/BaseServerAPI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ IEnumerator coroutine()
9696

9797
try
9898
{
99+
#if UNITY_EDITOR
99100
Debug.Log("Server Response: " + request.httpMethod + " " + request.endpoint + " completed in " + (Time.time - startTime).ToString("n4") + " secs.\nResponse: " + webRequest.downloadHandler.text);
101+
#endif
100102
}
101103
catch
102104
{

Assets/LootLocker/Common/ServerRequest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ public ServerRequest(string endpoint, HTTPMethod httpMethod = HTTPMethod.GET, st
251251
/// </summary>
252252
public void Send(System.Action<LootLockerResponse> OnServerResponse)
253253
{
254+
#if UNITY_EDITOR
254255
Debug.Log("Sending Request: " + httpMethod.ToString() + " " + endpoint + " -- queryParams: " + queryParams?.Count);
256+
#endif
255257
BaseServerAPI.I.SendRequest(this, (response) =>
256258
{
257259
OnServerResponse?.Invoke(response);

Assets/LootLocker/Game/LootLockerSDKManager.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public static bool CheckInitialized()
5050
{
5151
if (!initialized)
5252
{
53-
DebugMessage("Please initialize before calling sdk functions");
5453
return Init();
5554
}
5655

@@ -81,6 +80,13 @@ public static void DebugMessage(string message, bool IsError = false)
8180
#endregion
8281

8382
#region Authentication
83+
public static void VerifySteamID(string steamSessionTicket, Action<VerifyResponse> onComplete)
84+
{
85+
if (!CheckInitialized()) return;
86+
VerifyRequest verifyRequest = new VerifyRequest(steamSessionTicket);
87+
LootLockerAPIManager.Verify(verifyRequest, onComplete);
88+
}
89+
8490
public static void VerifyID(string deviceId, Action<VerifyResponse> onComplete)
8591
{
8692
if (!CheckInitialized()) return;
@@ -94,6 +100,12 @@ public static void StartSession(string deviceId, Action<SessionResponse> onCompl
94100
SessionRequest sessionRequest = new SessionRequest(deviceId);
95101
LootLockerAPIManager.Session(sessionRequest, onComplete);
96102
}
103+
public static void StartSteamSession(string steamId64, Action<SessionResponse> onComplete)
104+
{
105+
if (!CheckInitialized()) return;
106+
SessionRequest sessionRequest = new SessionRequest(steamId64);
107+
LootLockerAPIManager.Session(sessionRequest, onComplete);
108+
}
97109

98110
public static void EndSession(string deviceId, Action<SessionResponse> onComplete)
99111
{

0 commit comments

Comments
 (0)