public static void UpdateKeyValuePairById(LootLockerGetRequest lootLockerGetRequest, LootLockerCreateKeyValuePairRequest data, Action <LootLockerAssetDefaultResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.updateKeyValuePairById; string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0], lootLockerGetRequest.getRequests[1]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, onComplete: (serverResponse) => { LootLockerAssetDefaultResponse response = new LootLockerAssetDefaultResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerAssetDefaultResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.text = serverResponse.text; response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
public static void CallAPI(string endPoint, LootLockerHTTPMethod httpMethod, string body = null, Action <LootLockerResponse> onComplete = null, bool useAuthToken = true, LootLocker.LootLockerEnums.LootLockerCallerRole callerRole = LootLocker.LootLockerEnums.LootLockerCallerRole.User) { #if UNITY_EDITOR LootLockerSDKManager.DebugMessage("Caller Type: " + callerRole.ToString()); #endif Dictionary <string, string> headers = new Dictionary <string, string>(); if (useAuthToken) { headers = new Dictionary <string, string>(); headers.Add(callerRole == LootLocker.LootLockerEnums.LootLockerCallerRole.Admin ? "x-auth-token" : "x-session-token", callerRole == LootLocker.LootLockerEnums.LootLockerCallerRole.Admin ? LootLockerConfig.current.adminToken : LootLockerConfig.current.token); } if (LootLockerConfig.current != null) { headers.Add(LootLockerConfig.current.dateVersion.key, LootLockerConfig.current.dateVersion.value); } LootLockerBaseServerAPI.I.SwitchURL(callerRole); new LootLockerServerRequest(endPoint, httpMethod, body, headers, callerRole: callerRole).Send((response) => { onComplete?.Invoke(response); }); }
public static void CallDomainAuthAPI(string endPoint, LootLockerHTTPMethod httpMethod, string body = null, Action <LootLockerResponse> onComplete = null) { if (LootLockerConfig.current.domainKey.ToString().Length == 0) { #if UNITY_EDITOR LootLockerSDKManager.DebugMessage("LootLocker domain key must be set in settings", true); #endif onComplete?.Invoke(LootLockerResponseFactory.Error <LootLockerResponse>("LootLocker domain key must be set in settings")); return; } Dictionary <string, string> headers = new Dictionary <string, string>(); headers.Add("domain-key", LootLockerConfig.current.domainKey); if (LootLockerConfig.current.developmentMode) { headers.Add("is-development", "true"); } LootLockerBaseServerAPI.I.SwitchURL(LootLockerCallerRole.Base); new LootLockerServerRequest(endPoint, httpMethod, body, headers, callerRole: LootLockerCallerRole.Base).Send((response) => { onComplete?.Invoke(response); }); }
public static void GettingAllEvents(Action <LootLockerEventResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.gettingAllEvents; string getVariable = endPoint.endPoint; LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerEventResponse response = new LootLockerEventResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerEventResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; response.text = serverResponse.text; onComplete?.Invoke(response); } }, true); }
public static void GetAssetsById(LootLockerGetRequest data, Action <LootLockerAssetResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.getAssetsById; string builtAssets = data.getRequests.First(); if (data.getRequests.Count > 0) { for (int i = 1; i < data.getRequests.Count; i++) { builtAssets += "," + data.getRequests[i]; } } string getVariable = string.Format(endPoint.endPoint, builtAssets); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerAssetResponse response = new LootLockerAssetResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerAssetResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
public static void GetAssetListWithCount(LootLockerGetRequest data, Action <LootLockerAssetResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.gettingAssetListWithCount; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerAssetResponse response = new LootLockerAssetResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerAssetResponse>(serverResponse.text); response.text = serverResponse.text; if (response != null) { LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0; } onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
public static void OpenALootBox(LootLockerGetRequest data, Action <LootLockerOpenLootBoxResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.deleteKeyValuePair; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerOpenLootBoxResponse response = new LootLockerOpenLootBoxResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerOpenLootBoxResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.text = serverResponse.text; response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
public LootLockerServerRequest(string endpoint, LootLockerHTTPMethod httpMethod = LootLockerHTTPMethod.GET, byte[] upload = null, string uploadName = null, string uploadType = null, Dictionary <string, string> body = null, Dictionary <string, string> extraHeaders = null, bool useAuthToken = true, LootLocker.LootLockerEnums.LootLockerCallerRole callerRole = LootLocker.LootLockerEnums.LootLockerCallerRole.User, bool isFileUpload = true) { this.retryCount = 0; this.endpoint = endpoint; this.httpMethod = httpMethod; this.payload = null; this.upload = upload; this.uploadName = uploadName; this.uploadType = uploadType; this.jsonPayload = null; this.extraHeaders = extraHeaders != null && extraHeaders.Count == 0 ? null : extraHeaders; // Force extra headers to null if empty dictionary was supplied this.queryParams = null; this.adminCall = callerRole; this.form = new WWWForm(); foreach (var kvp in body) { this.form.AddField(kvp.Key, kvp.Value); } this.form.AddBinaryData("file", upload, uploadName); bool isNonPayloadMethod = (this.httpMethod == LootLockerHTTPMethod.GET || this.httpMethod == LootLockerHTTPMethod.HEAD || this.httpMethod == LootLockerHTTPMethod.OPTIONS); if (this.payload != null && isNonPayloadMethod) { LootLockerSDKManager.DebugMessage("WARNING: Payloads should not be sent in GET, HEAD, OPTIONS, requests. Attempted to send a payload to: " + this.httpMethod.ToString() + " " + this.endpoint); } }
public static void Session(LootLockerGetRequest data, Action <LootLockerSessionResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.authenticationRequest; string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) => { LootLockerSessionResponse response = new LootLockerSessionResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerSessionResponse>(serverResponse.text); LootLockerConfig.current.UpdateToken(response.session_token, (data as LootLockerSessionRequest)?.player_identifier); onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, false); }
public void SelectPlayer(LocalPlayer selectedPlayer) { if (isEasyPrefab) { Debug.LogError("You clicked on player " + selectedPlayer.playerName + " thats all we know :) "); return; } playersScreen.SetActive(false); createPlayerScreen.SetActive(false); LoadingManager.ShowLoadingScreen(); LootLockerConfig.current.deviceID = selectedPlayer.uniqueID; LootLockerSDKManager.StartSession(selectedPlayer.uniqueID, (response) => { if (response.success) { playersScreen.SetActive(true); Debug.Log("Logged in successfully."); LoadingManager.HideLoadingScreen(); LootLockerConfig.current.playerName = selectedPlayer.playerName; LootLockerConfig.current.playerClass = selectedPlayer.characterClass.type.ToString(); StagesManager.instance.GoToStage(StagesManager.StageID.Home, response); } else { playersScreen.SetActive(true); Debug.LogError("Log in failure."); LoadingManager.HideLoadingScreen(); } }); }
void ListMessages() { LoadingManager.ShowLoadingScreen(); LootLockerSDKManager.GetMessages((response) => { LoadingManager.HideLoadingScreen(); if (response.success) { Debug.Log("Successful got all messages: " + response.text); for (int i = 0; i < messagesParent.childCount; i++) { Destroy(messagesParent.GetChild(i).gameObject); } foreach (LootLockerGMMessage message in response.messages) { GameObject messageObject = Instantiate(messagePrefab, messagesParent); messageObject.GetComponent <MessageElement>().InitMessage(message); messageObject.GetComponent <Button>().onClick.AddListener(() => SelectMessage(message)); } } else { Debug.LogError("failed to get all messages: " + response.Error); } }); }
public static void Verify(LootLockerVerifyRequest data, Action <LootLockerVerifyResponse> onComplete) { string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } EndPointClass endPoint = LootLockerEndPoints.current.playerVerification; LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) => { LootLockerVerifyResponse response = new LootLockerVerifyResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerVerifyResponse>(serverResponse.text); onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, false); }
public void Delete() { if (string.IsNullOrEmpty(key.text) || string.IsNullOrEmpty(key.text)) { PopupSystem.ShowPopup("Please enter valid text for key and value", null, "Close", () => { }, url: keySucces, isError: true); return; } LoadingManager.ShowLoadingScreen(); LootLockerSDKManager.DeleteKeyValue(key.text, (response) => { LoadingManager.HideLoadingScreen(); if (response.success) { Dictionary <string, string> data = new Dictionary <string, string>(); data.Add("Key", key.text); PopupSystem.ShowPopup("Deletion Successful", data, "Close", () => { StagesManager.instance.GoToStage(StagesManager.StageID.Storage, null); GetComponent <ScreenCloser>()?.Close(); PopupSystem.CloseNow(); }, url: keySucces); } }); }
public static void UpdatingAnAssetCandidate(LootLockerCreatingOrUpdatingAnAssetCandidateRequest data, LootLockerGetRequest getRequests, Action <LootLockerUserGenerateContentResponse> onComplete) { EndPointClass requestEndPoint = LootLockerEndPoints.current.updatingAnAssetCandidate; string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } string endPoint = string.Format(requestEndPoint.endPoint, getRequests.getRequests[0]); LootLockerServerRequest.CallAPI(endPoint, requestEndPoint.httpMethod, json, (serverResponse) => { LootLockerUserGenerateContentResponse response = new LootLockerUserGenerateContentResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerUserGenerateContentResponse>(serverResponse.text); onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true, LootLocker.LootLockerEnums.LootLockerCallerRole.User); }
public void GetEntirePersistentStorage() { LootLockerSDKManager.GetEntirePersistentStorage((getPersistentStoragResponse) => { if (getPersistentStoragResponse.success) { labelText = "Success\n" + getPersistentStoragResponse.text; dataToSave.Clear(); for (int i = 0; i < getPersistentStoragResponse.payload.Length; i++) { dataToSave.Add(getPersistentStoragResponse.payload[i]); } dataToSave = getPersistentStoragResponse.payload.ToList(); if (!started) { started = true; if (dataToSave.Count > 0) { keyToDelete = dataToSave[0].key; } } } else { labelText = "Failed\n" + getPersistentStoragResponse.text; } }); }
public void UpdateScreen(LootLockerSessionResponse sessionResponse) { if (sessionResponse == null) { return; } username.text = LootLockerConfig.current.playerName; playerId.text = sessionResponse.player_id.ToString(); className.text = LootLockerConfig.current.playerClass; credits.text = sessionResponse.account_balance.ToString(); level.text = sessionResponse.level.ToString(); if (message != null) { message.text = ""; } LootLockerSDKManager.GetMessages((response) => { LoadingManager.HideLoadingScreen(); if (response.success) { if (message != null) { message.text = response.messages.Length > 0 ? response.messages.First().title : ""; } } else { Debug.LogError("failed to get all messages: " + response.Error); } }); }
public static void GettingASingleEvent(LootLockerGetRequest data, Action <LootLockerSingleEventResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.gettingASingleEvent; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerSingleEventResponse response = new LootLockerSingleEventResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerSingleEventResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.text = serverResponse.text; response.success = serverResponse.success; response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode; onComplete?.Invoke(response); } }, true); }
public void Save() { if (string.IsNullOrEmpty(key.text) || string.IsNullOrEmpty(key.text)) { PopupSystem.ShowPopup("Please enter valid text for key and value", null, "Close", () => { }, url: keySucces, isError: true); return; } LoadingManager.ShowLoadingScreen(); LootLockerSDKManager.UpdateOrCreateKeyValue(key.text, value.text, (response) => { LoadingManager.HideLoadingScreen(); if (response.success) { Dictionary <string, string> data = new Dictionary <string, string>(); data.Add("Key", key.text); data.Add("Value", value.text); DemoAppGetPersistentStoragResponse mainResponse = JsonConvert.DeserializeObject <DemoAppGetPersistentStoragResponse>(response.text); PopupSystem.ShowPopup("Save Successful", data, "Close", () => { StagesManager.instance.GoToStage(StagesManager.StageID.Storage, mainResponse); GetComponent <ScreenCloser>()?.Close(); PopupSystem.CloseNow(); }, url: keySucces); } }); }
public void StartSession() { Guid guid = Guid.NewGuid(); LoadingManager.ShowLoadingScreen(); //Starting a new session using the new id that has been created LootLockerSDKManager.StartSession(guid.ToString(), (response) => { if (response.success) { Debug.Log("Created Session for new player with id: " + guid.ToString()); LocalPlayer localPlayer = new LocalPlayer { playerName = newPlayerName.text, uniqueID = guid.ToString(), characterClass = null }; List <LocalPlayer> localPlayers = JsonConvert.DeserializeObject <List <LocalPlayer> >(PlayerPrefs.GetString(playerStorageKeyNameToUse)); localPlayers.Add(localPlayer); PlayerPrefs.SetString(playerStorageKeyNameToUse, JsonConvert.SerializeObject(localPlayers)); ListPlayers(); LoadingManager.HideLoadingScreen(); } else { Debug.LogError("Session failure: " + response.text); } }); }
public void ViewCollectables() { objects.Clear(); LootLockerSDKManager.GettingCollectables((response) => { LoadingManager.HideLoadingScreen(); AppDemoLootLockerRequests.GettingCollectablesResponse mainResponse = JsonConvert.DeserializeObject <AppDemoLootLockerRequests.GettingCollectablesResponse>(response.text); if (mainResponse.success) { Debug.Log("Successfuly got collectables: " + mainResponse.text); for (int i = scrollViewContent.childCount - 1; i >= 0; i--) { Destroy(scrollViewContent.GetChild(i).gameObject); } LootLockerCollectable[] collectables = response.collectables; for (int i = 0; i < collectables.Length; i++) { GameObject newCollectableObject = Instantiate(collectableRecordPrefab); objects.Add(newCollectableObject); newCollectableObject.GetComponent <ContextControllerCollectables>()?.Init(mainResponse.collectables[i].groups, mainResponse.collectables[i].name, imagesForCollectables); } StartCoroutine(DelayShowing()); } else { Debug.Log(response.Error); } }); }
public void ViewStore() { for (int i = 0; i < parent.childCount; i++) { Destroy(parent.GetChild(i).gameObject); } this.normalText.text = ""; this.normalText.text += "Price" + " : " + "" + "\n"; this.normalText.text += "Asset Name" + " : " + "" + "\n"; this.normalText.text += "Asset Context" + " : " + "" + "\n"; LootLockerSDKManager.GetEquipableContextToDefaultCharacter((contextResponse) => { LoadingManager.HideLoadingScreen(); if (contextResponse.success) { Debug.Log("Successful got context: " + contextResponse.text); UpdateBalanceDisplay(); LootLockerSDKManager.GetAssetListWithCount(50, (response) => { Debug.Log("Successful got Assets: " + response.text); LoadingManager.HideLoadingScreen(); InventoryAssetResponse.AssetResponse mainResponse = JsonConvert.DeserializeObject <InventoryAssetResponse.AssetResponse>(response.text); if (mainResponse.success) { string[] contexts = contextResponse.contexts.Select(x => x.name).ToArray(); InventoryAssetResponse.DemoAppAsset[] assets = mainResponse.assets?.Where(x => x.purchasable && x.price > 0)?.ToArray(); for (int i = 0; i < contexts.Length; i++) { GameObject contextObject = Instantiate(contextPrefab, parent); ContextController contextController = contextObject.GetComponent <ContextController>(); contextController.Init(contexts[i], assets.FirstOrDefault(x => x.context == contexts[i])?.id.ToString()); InventoryAssetResponse.DemoAppAsset[] assetsForContextController = assets.Where(x => x.context == contextController.context)?.ToArray(); contextController.Populate(assetsForContextController); } this.headerText.text = "Store"; selectText.text = "Buy"; this.normalText.text = ""; this.normalText.text += "Price" + " : " + "" + "\n"; this.normalText.text += "Asset Name" + " : " + "" + "\n"; this.normalText.text += "Asset Context" + " : " + "" + "\n"; } else { Debug.LogError("failed to get all inventory items: " + response.Error); } }); } else { Debug.LogError("Failed to get context: " + contextResponse.Error); } }); }
public void OnElementClicked() { string[] names = itemToCollect.Split('.'); Dictionary <string, string> data = new Dictionary <string, string>(); data.Add("Collectable", names[0]); data.Add("Group Name", names[1]); data.Add("Item Name", names[2]); string header = ""; item.url = groupName + "_Active"; PopupSystem.ShowPopup("Collectable", data, "Collect", () => { LoadingManager.ShowLoadingScreen(); LootLockerSDKManager.CollectingAnItem(itemToCollect, (response) => { LoadingManager.HideLoadingScreen(); if (response.success) { Debug.Log("Success\n" + response.text); header = "Success"; data.Clear(); AppDemoLootLockerRequests.CollectingAnItemResponse mainResponse = JsonConvert.DeserializeObject <AppDemoLootLockerRequests.CollectingAnItemResponse>(response.text); string[] collectableStrings = itemToCollect.Split('.'); string collectable = collectableStrings[0]; string group = collectableStrings[1]; string tempItem = collectableStrings[2]; mainResponse.mainCollectable = mainResponse.collectables?.FirstOrDefault(x => x.name == collectable); mainResponse.mainGroup = mainResponse.mainCollectable?.groups?.FirstOrDefault(x => x.name == group); mainResponse.mainItem = mainResponse.mainGroup?.items?.FirstOrDefault(x => x.name == tempItem); //Preparing data to display or error messages we have data.Add("1", "You successfully collected: " + itemToCollect); PopupSystem.ShowApprovalFailPopUp(header, data, item.url, false, onComplete: () => { ShowRewards(mainResponse.mainItem, mainResponse.mainGroup, mainResponse.mainCollectable); }); UpdateButtonAppearance(mainResponse.mainItem); } else { header = "Collection Failed"; data.Clear(); //Preparing data to display or error messages we have data.Add("1", "Collection of item failed"); PopupSystem.ShowApprovalFailPopUp(header, data, item.url, true); Debug.Log("Failed\n" + response.text); } }); }, groupName + "_Active"); }
public void Refresh() { LoadingManager.ShowLoadingScreen(); foreach (Transform tr in content.transform) { Destroy(tr.gameObject); } LootLockerSDKManager.GetEntirePersistentStorage((response) => { LoadingManager.HideLoadingScreen(); UpdateScreen(response.payload); }); }
public void ButtonClicked() { if (currentAsset.asset != null) { if (currentAsset.asset.files != null && currentAsset.asset.files.Length > 0) { StagesManager.instance.GoToStage(StagesManager.StageID.Files, currentAsset.asset); return; } } string header = "Equip"; string btnText = "Equip"; Dictionary <string, string> data = new Dictionary <string, string>(); data.Add("Asset Name", currentAsset.asset.name); data.Add("Asset Context", currentAsset.asset.context); PopupSystem.ShowPopup(header, data, btnText, () => { LoadingManager.ShowLoadingScreen(); LootLockerSDKManager.EquipIdAssetToDefaultCharacter(currentAsset.inventory.instance_id.ToString(), (response) => { LoadingManager.HideLoadingScreen(); if (response.success) { header = "Success"; data.Clear(); //Preparing data to display or error messages we have data.Add("1", "You successfully equipped: " + currentAsset.inventory.asset.name); LoadingManager.ShowLoadingScreen(); StagesManager.instance.GoToStage(StagesManager.StageID.Inventory, null); PopupSystem.ShowApprovalFailPopUp(header, data, currentAsset.asset.url, false); } else { Debug.LogError(response.Error); header = "Failed"; data.Clear(); //Preparing data to display or error messages we have string correctedResponse = response.Error.First() == '{' ? response.Error : response.Error.Substring(response.Error.IndexOf('{')); ResponseError equipErrorResponse = new ResponseError(); equipErrorResponse = JsonConvert.DeserializeObject <ResponseError>(correctedResponse); data.Add("1", equipErrorResponse.messages[0]); PopupSystem.ShowApprovalFailPopUp(header, data, currentAsset.asset.url, true); } }); }, currentAsset.asset.url); }
public void SubmittingACrashLog() { LootLockerSDKManager.SubmittingACrashLog(logFilePath, game_version, type_identifier, local_crash_time, (response) => { if (!response.hasError) { LootLockerSDKManager.DebugMessage("Successful"); } else { LootLockerSDKManager.DebugMessage("failed: " + response.Error, true); } }); }
public void RemovingFilesFromAssetCandidates() { LootLockerSDKManager.RemovingFilesFromAssetCandidates(assetId, fileId, (response) => { if (response.success) { LootLockerSDKManager.DebugMessage("Successful"); } else { LootLockerSDKManager.DebugMessage("failed: " + response.Error, true); } }); }
public void CreatingAnAssetCandidate() { LootLockerSDKManager.CreatingAnAssetCandidate(assetName, (response) => { if (response.success) { LootLockerSDKManager.DebugMessage("Successful"); } else { LootLockerSDKManager.DebugMessage("failed: " + response.Error, true); } }, context_id: sendContextId ? 21 : -1); }
public void UpdatingAnAssetCandidate() { LootLockerSDKManager.UpdatingAnAssetCandidate(assetId, markAssetAsComplete, (response) => { if (response.success) { LootLockerSDKManager.DebugMessage("Successful"); } else { LootLockerSDKManager.DebugMessage("failed: " + response.Error, true); } }, name: assetName); }
public void GettingASingleAssetCandidate() { LootLockerSDKManager.GettingASingleAssetCandidate(assetId, (response) => { if (response.success) { LootLockerSDKManager.DebugMessage("Successful" + response.asset_candidate.asset_id); } else { LootLockerSDKManager.DebugMessage("failed: " + response.Error, true); } }); }
public void ListingAssetCandidates() { LootLockerSDKManager.ListingAssetCandidates((response) => { if (response.success) { LootLockerSDKManager.DebugMessage("Successful"); } else { LootLockerSDKManager.DebugMessage("failed: " + response.Error, true); } }); }