com.xd.sdk.common 7.2.0 → 7.2.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/Steam/SteamBuildProcessor.cs +1 -4
- package/Resources/Localization/LocalizableString.json +56 -56
- package/Runtime/Internal/Standalone/CommonFeaturesImpl.cs +2 -2
- package/Runtime/Internal/Standalone/Steam/SteamManager.cs +358 -0
- package/Runtime/Internal/Standalone/Steam/{SteamUtils.cs.meta → SteamManager.cs.meta} +1 -4
- package/Runtime/Internal/Standalone/{Utils → Steam}/SteamWrapper.cs +48 -49
- package/package.json +2 -2
- package/Runtime/Internal/Standalone/Steam/SteamUtils.cs +0 -48
- /package/Runtime/Internal/Standalone/{Utils → Steam}/SteamWrapper.cs.meta +0 -0
|
@@ -83,15 +83,15 @@
|
|
|
83
83
|
"tds_refund_login_restrict_title": "暂时无法进入游戏",
|
|
84
84
|
"tds_refund_login_restrict_sub_title": "将所有退款订单补款完成后即可进入游戏",
|
|
85
85
|
"tds_refund_ios_pay_tip": "您有剩余退款订单无法在此系统进行补款,需要使用iOS系统登录游戏后进行补款",
|
|
86
|
-
"tds_pay_success": "
|
|
87
|
-
"tds_pay_fail": "
|
|
88
|
-
"tds_pay_cancel": "
|
|
86
|
+
"tds_pay_success": "操作完成",
|
|
87
|
+
"tds_pay_fail": "操作失败",
|
|
88
|
+
"tds_pay_cancel": "用户已取消",
|
|
89
89
|
"tds_button_confirm": "确认",
|
|
90
90
|
"tds_promotion_exchange_title": "领取商品",
|
|
91
91
|
"tds_promotion_exchange_desc": "你已经拥有该商品 ,是否发放给本角色",
|
|
92
92
|
"tds_refund_android_pay_tip": "您有剩余退款订单无法在此系统进行补款,需要使用Android系统登录游戏后进行补款",
|
|
93
93
|
"tds_refund_all_pay_tip": "您有剩余退款订单无法在此系统进行补款,需要使用Android、iOS系统登录游戏后进行补款",
|
|
94
|
-
"tds_pay_net_fail": "
|
|
94
|
+
"tds_pay_net_fail": "网络异常,请稍后重试",
|
|
95
95
|
"tds_refund_net_fail": "网络异常,补款失败",
|
|
96
96
|
"tds_purchase_processing": "该订单正在处理中,请稍后",
|
|
97
97
|
"tds_terms_agreement": "条款协议",
|
|
@@ -224,15 +224,15 @@
|
|
|
224
224
|
"tds_refund_login_restrict_title": "В данный момент невозможно войти в игре",
|
|
225
225
|
"tds_refund_login_restrict_sub_title": "Завершите операции оплаты для всех возвращенных покупок, чтобы получить доступ к игре",
|
|
226
226
|
"tds_refund_ios_pay_tip": "Некоторые из ваших возвращенных покупок невозможно оплатить в данной системе. Зайдите в систему, используя устройство на системе iOS, чтобы завершить оплату",
|
|
227
|
-
"tds_pay_success": "
|
|
228
|
-
"tds_pay_fail": "Ошибка
|
|
229
|
-
"tds_pay_cancel": "
|
|
227
|
+
"tds_pay_success": "Операция выполнена",
|
|
228
|
+
"tds_pay_fail": "Ошибка операции",
|
|
229
|
+
"tds_pay_cancel": "Отменено пользователем",
|
|
230
230
|
"tds_button_confirm": "Подтвердить",
|
|
231
231
|
"tds_promotion_exchange_title": "Забрать предметы",
|
|
232
232
|
"tds_promotion_exchange_desc": "У вас уже имеется данный предмет. Выдать его текущему персонажу",
|
|
233
233
|
"tds_refund_android_pay_tip": "Некоторые из ваших возвращенных покупок невозможно оплатить в данной системе. Зайдите в систему, используя устройство на системе Android, чтобы завершить оплату",
|
|
234
234
|
"tds_refund_all_pay_tip": "Некоторые из ваших возвращенных покупок невозможно оплатить в данной системе. Зайдите в систему, используя устройство на системе Android、iOS, чтобы завершить оплату",
|
|
235
|
-
"tds_pay_net_fail": "Ошибка сети.
|
|
235
|
+
"tds_pay_net_fail": "Ошибка сети. Повторите попытку позже",
|
|
236
236
|
"tds_refund_net_fail": "Ошибка сети. Не удалось оплатить",
|
|
237
237
|
"tds_purchase_processing": "Заказ обрабатывается. Подождите",
|
|
238
238
|
"tds_terms_agreement": "Правила предоставления услуг",
|
|
@@ -365,15 +365,15 @@
|
|
|
365
365
|
"tds_refund_login_restrict_title": "Şuanda oyuna erişim yok.",
|
|
366
366
|
"tds_refund_login_restrict_sub_title": "Tüm iadelerin ödemesini yaparak oyuna giriş yapabilirsiniz",
|
|
367
367
|
"tds_refund_ios_pay_tip": "İade edilen bazı siparişleriniz sistemde tekrar ödenemiyor. Lütfen IOS cihaz üzerinden giriş yaparak ödemeyi tamamlayınız",
|
|
368
|
-
"tds_pay_success": "
|
|
369
|
-
"tds_pay_fail": "
|
|
370
|
-
"tds_pay_cancel": "
|
|
368
|
+
"tds_pay_success": "İşlem tamamlandı",
|
|
369
|
+
"tds_pay_fail": "İşlem başarısız oldu",
|
|
370
|
+
"tds_pay_cancel": "Kullanıcı tarafından iptal edildi",
|
|
371
371
|
"tds_button_confirm": "Onayla",
|
|
372
372
|
"tds_promotion_exchange_title": "Ürünü al",
|
|
373
373
|
"tds_promotion_exchange_desc": "Ürün zaten mevcut. Mevcut karaktere eklensin mi",
|
|
374
374
|
"tds_refund_android_pay_tip": "İade edilen bazı siparişleriniz sistemde tekrar ödenemiyor. Lütfen Android cihaz üzerinden giriş yaparak ödemeyi tamamlayınız",
|
|
375
375
|
"tds_refund_all_pay_tip": "İade edilen bazı siparişleriniz sistemde tekrar ödenemiyor. Lütfen Android、iOS cihaz üzerinden giriş yaparak ödemeyi tamamlayınız",
|
|
376
|
-
"tds_pay_net_fail": "
|
|
376
|
+
"tds_pay_net_fail": "Ağ hatası, lütfen daha sonra tekrar deneyin",
|
|
377
377
|
"tds_refund_net_fail": "Bağlantı hatası. Geri Ödeme başarısız",
|
|
378
378
|
"tds_purchase_processing": "Sipariş işleniyor. Lütfen bekleyin",
|
|
379
379
|
"tds_terms_agreement": "Şart ve Koşullar",
|
|
@@ -507,15 +507,15 @@
|
|
|
507
507
|
"tds_refund_login_restrict_title": "No es posible acceder al juego ahora",
|
|
508
508
|
"tds_refund_login_restrict_sub_title": "Complete el pago de todos los pedidos reembolsados para acceder al juego",
|
|
509
509
|
"tds_refund_ios_pay_tip": "Tiene pedidos de reembolso pendientes que no pueden ser resueltos en este sistema. Necesita entrar al juego usando el sistema iOS y hacer un pago",
|
|
510
|
-
"tds_pay_success": "
|
|
511
|
-
"tds_pay_fail": "
|
|
512
|
-
"tds_pay_cancel": "
|
|
510
|
+
"tds_pay_success": "Operación completada",
|
|
511
|
+
"tds_pay_fail": "La operación falló",
|
|
512
|
+
"tds_pay_cancel": "Cancelado por el usuario",
|
|
513
513
|
"tds_button_confirm": "Confirmar",
|
|
514
514
|
"tds_promotion_exchange_title": "Obtener",
|
|
515
515
|
"tds_promotion_exchange_desc": "¿Ya tienes este artículo, deseas enviarlo a este personaje",
|
|
516
516
|
"tds_refund_android_pay_tip": "Tiene pedidos de reembolso pendientes que no pueden ser resueltos en este sistema. Necesita entrar al juego usando el sistema Android y hacer un pago",
|
|
517
517
|
"tds_refund_all_pay_tip": "Tiene pedidos de reembolso pendientes que no pueden ser resueltos en este sistema. Necesita entrar al juego usando el sistema Android、iOS y hacer un pago",
|
|
518
|
-
"tds_pay_net_fail": "Error de red
|
|
518
|
+
"tds_pay_net_fail": "Error de red, inténtalo de nuevo más tarde",
|
|
519
519
|
"tds_refund_net_fail": "Error de red. Fallo al suplir pago",
|
|
520
520
|
"tds_purchase_processing": "Este pedido está siendo procesado, por favor espere",
|
|
521
521
|
"tds_terms_agreement": "Términos y condiciones",
|
|
@@ -648,15 +648,15 @@
|
|
|
648
648
|
"tds_refund_login_restrict_title": "Temporariamente Indisponível",
|
|
649
649
|
"tds_refund_login_restrict_sub_title": "Depois de repôr todos os pedidos de reembolso, você pode entrar no jogo",
|
|
650
650
|
"tds_refund_ios_pay_tip": "Você tem pedidos de reembolso restantes que não podem ser reembolsados neste sistema. É necessário fazer login no jogo através do sistema iOS para que o dinheiro seja reposto.",
|
|
651
|
-
"tds_pay_success": "
|
|
652
|
-
"tds_pay_fail": "
|
|
653
|
-
"tds_pay_cancel": "
|
|
651
|
+
"tds_pay_success": "Operação concluída",
|
|
652
|
+
"tds_pay_fail": "A operação falhou",
|
|
653
|
+
"tds_pay_cancel": "Cancelado pelo usuário",
|
|
654
654
|
"tds_button_confirm": "Confirmar",
|
|
655
655
|
"tds_promotion_exchange_title": "Recolher bens",
|
|
656
656
|
"tds_promotion_exchange_desc": "Você já possui o produto - ele foi enviado para este personagem",
|
|
657
657
|
"tds_refund_android_pay_tip": "Você tem pedidos de reembolso restantes que não podem ser reembolsados neste sistema. É necessário fazer login no jogo através do sistema Android para que o dinheiro seja reposto",
|
|
658
658
|
"tds_refund_all_pay_tip": "Você tem pedidos de reembolso restantes que não podem ser reembolsados neste sistema. É necessário fazer login no jogo através do sistema Android、iOS para que o dinheiro seja reposto",
|
|
659
|
-
"tds_pay_net_fail": "
|
|
659
|
+
"tds_pay_net_fail": "Erro de rede, tente novamente mais tarde",
|
|
660
660
|
"tds_refund_net_fail": "A rede está anormal, reposição falhou",
|
|
661
661
|
"tds_purchase_processing": "O pedido está sendo processado. Por favor, aguarde",
|
|
662
662
|
"tds_terms_agreement": "Termos de uso",
|
|
@@ -789,15 +789,15 @@
|
|
|
789
789
|
"tds_refund_login_restrict_title": "Impossible d'accéder au jeu pour le moment",
|
|
790
790
|
"tds_refund_login_restrict_sub_title": "Effectuer le paiement de toutes les commandes remboursées pour accéder au jeu",
|
|
791
791
|
"tds_refund_ios_pay_tip": "Certaines de vos commandes remboursées ne peuvent pas être remboursées dans ce système. Veuillez vous connecter via un appareil iOS pour effectuer le paiement",
|
|
792
|
-
"tds_pay_success": "
|
|
793
|
-
"tds_pay_fail": "Échec de
|
|
794
|
-
"tds_pay_cancel": "
|
|
792
|
+
"tds_pay_success": "Opération terminée",
|
|
793
|
+
"tds_pay_fail": "Échec de l’opération",
|
|
794
|
+
"tds_pay_cancel": "Annulé par l’utilisateur",
|
|
795
795
|
"tds_button_confirm": "Confirmer",
|
|
796
796
|
"tds_promotion_exchange_title": "Réclamer les produits",
|
|
797
797
|
"tds_promotion_exchange_desc": "Vous avez déjà le produit. L'attribuer au personnage actuel",
|
|
798
798
|
"tds_refund_android_pay_tip": "Certaines de vos commandes remboursées ne peuvent pas être remboursées dans ce système. Veuillez vous connecter via un appareil Android pour effectuer le paiement",
|
|
799
799
|
"tds_refund_all_pay_tip": "Certaines de vos commandes remboursées ne peuvent pas être remboursées dans ce système. Veuillez vous connecter via un appareil Android、iOS pour effectuer le paiement",
|
|
800
|
-
"tds_pay_net_fail": "Erreur
|
|
800
|
+
"tds_pay_net_fail": "Erreur réseau, veuillez réessayer plus tard",
|
|
801
801
|
"tds_refund_net_fail": "Erreur de réseau. Remboursement échoué",
|
|
802
802
|
"tds_purchase_processing": "La commande est en cours de traitement. Veuillez patienter",
|
|
803
803
|
"tds_terms_agreement": "Termes et Conditions",
|
|
@@ -930,15 +930,15 @@
|
|
|
930
930
|
"tds_refund_login_restrict_title": "Aktuell kann man nicht auf das Spiel zugreifen",
|
|
931
931
|
"tds_refund_login_restrict_sub_title": "Zahle alle Zahlungen für alle zurückerstatteten Bestellungen zurück, um auf das Spiel zuzugreifen",
|
|
932
932
|
"tds_refund_ios_pay_tip": "Einige deiner erstatteten Bestellungen können in diesem System nicht zurückgezahlt werden. Melde dich bitte über ein iOS-Gerät an, um die Zahlung zu vollenden",
|
|
933
|
-
"tds_pay_success": "
|
|
934
|
-
"tds_pay_fail": "
|
|
935
|
-
"tds_pay_cancel": "
|
|
933
|
+
"tds_pay_success": "Vorgang abgeschlossen",
|
|
934
|
+
"tds_pay_fail": "Vorgang fehlgeschlagen",
|
|
935
|
+
"tds_pay_cancel": "Vom Benutzer abgebrochen",
|
|
936
936
|
"tds_button_confirm": "Bestätigen",
|
|
937
937
|
"tds_promotion_exchange_title": "Artikel erhalten",
|
|
938
938
|
"tds_promotion_exchange_desc": "Du besitzt bereits diesen Artikel. Willst du ihn diesen Charakter geben",
|
|
939
939
|
"tds_refund_android_pay_tip": "Einige deiner erstatteten Bestellungen können in diesem System nicht zurückgezahlt werden. Melde dich bitte über ein Android-Gerät an, um die Zahlung zu vollenden",
|
|
940
940
|
"tds_refund_all_pay_tip": "Einige deiner erstatteten Bestellungen können in diesem System nicht zurückgezahlt werden. Melde dich bitte über ein Android/iOS-Gerät an, um die Zahlung zu vollenden",
|
|
941
|
-
"tds_pay_net_fail": "Netzwerkfehler
|
|
941
|
+
"tds_pay_net_fail": "Netzwerkfehler, bitte versuchen Sie es später erneut",
|
|
942
942
|
"tds_refund_net_fail": "Netzwerkfehler. Rückzahlung fehlgeschlagen",
|
|
943
943
|
"tds_purchase_processing": "Diese Bestellung wird bearbeitet, bitte später erneut versuchen",
|
|
944
944
|
"tds_terms_agreement": "Allgemeine Geschäftsbedingungen",
|
|
@@ -1071,15 +1071,15 @@
|
|
|
1071
1071
|
"tds_refund_login_restrict_title": "일시적으로 게임에 접속할 수 없습니다",
|
|
1072
1072
|
"tds_refund_login_restrict_sub_title": "임의 환불로 인한 차액이 결제되어야 게임에 접속할 수 있습니다",
|
|
1073
1073
|
"tds_refund_ios_pay_tip": "고객님의 환불 복구 프로세스를 현 환경에서 진행할 수 없습니다. iOS 시스템상에서 게임 로그인 후 다시 시도해주세요",
|
|
1074
|
-
"tds_pay_success": "
|
|
1075
|
-
"tds_pay_fail": "
|
|
1076
|
-
"tds_pay_cancel": "
|
|
1074
|
+
"tds_pay_success": "작업이 완료되었습니다",
|
|
1075
|
+
"tds_pay_fail": "작업이 실패했습니다",
|
|
1076
|
+
"tds_pay_cancel": "사용자가 취소했습니다",
|
|
1077
1077
|
"tds_button_confirm": "확인",
|
|
1078
1078
|
"tds_promotion_exchange_title": "상품 수령",
|
|
1079
1079
|
"tds_promotion_exchange_desc": "해당 상품을 이전에 기구입하신 상태입니다. 현재 캐릭터에게 기존 구입상품을 우선 지급하시겠습니까",
|
|
1080
1080
|
"tds_refund_android_pay_tip": "고객님의 환불 복구 프로세스를 현 환경에서 진행할 수 없습니다. Android 시스템상에서 게임 로그인 후 다시 시도해주세요",
|
|
1081
1081
|
"tds_refund_all_pay_tip": "고객님의 환불 복구 프로세스를 현 환경에서 진행할 수 없습니다. Android、iOS 시스템상에서 게임 로그인 후 다시 시도해주세요",
|
|
1082
|
-
"tds_pay_net_fail": "네트워크
|
|
1082
|
+
"tds_pay_net_fail": "네트워크 오류입니다. 잠시 후 다시 시도하세요",
|
|
1083
1083
|
"tds_refund_net_fail": "네트워크 오류, 환불 차액 결제 실패",
|
|
1084
1084
|
"tds_purchase_processing": "이 주문건은 처리 중에 있습니다. 잠시만 기다려 주세요",
|
|
1085
1085
|
"tds_terms_agreement": "동의항목",
|
|
@@ -1213,15 +1213,15 @@
|
|
|
1213
1213
|
"tds_refund_login_restrict_title": "一時的にゲームにアクセスできません",
|
|
1214
1214
|
"tds_refund_login_restrict_sub_title": "ゲームにアクセスするためには、すべての返金における残額を決済する必要があります",
|
|
1215
1215
|
"tds_refund_ios_pay_tip": "払い戻し部分の支払いは本システム内で処理できません。iOSの端末でゲームをログインして購入の手続きをお願い致します",
|
|
1216
|
-
"tds_pay_success": "
|
|
1217
|
-
"tds_pay_fail": "
|
|
1218
|
-
"tds_pay_cancel": "
|
|
1216
|
+
"tds_pay_success": "操作が完了しました",
|
|
1217
|
+
"tds_pay_fail": "操作に失敗しました",
|
|
1218
|
+
"tds_pay_cancel": "ユーザーがキャンセルしました",
|
|
1219
1219
|
"tds_button_confirm": "確認",
|
|
1220
1220
|
"tds_promotion_exchange_title": "商品(アイテム)を受け取ります",
|
|
1221
1221
|
"tds_promotion_exchange_desc": "既にこの商品(アイテム)を持っていますので、このキャラに付与しますか",
|
|
1222
1222
|
"tds_refund_android_pay_tip": "払い戻し部分の支払いは本システム内で処理できません。Androidの端末でゲームをログインして購入の手続きをお願い致します",
|
|
1223
1223
|
"tds_refund_all_pay_tip": "払い戻し部分の支払いは本システム内で処理できません。Android、iOSの端末でゲームをログインして購入の手続きをお願い致します",
|
|
1224
|
-
"tds_pay_net_fail": "
|
|
1224
|
+
"tds_pay_net_fail": "ネットワークエラーです。しばらくしてから再試行してください",
|
|
1225
1225
|
"tds_refund_net_fail": "ネット枠エラーにより残額の決済に失敗しました",
|
|
1226
1226
|
"tds_purchase_processing": "購入処理を行っております。しばらくお待ちください",
|
|
1227
1227
|
"tds_terms_agreement": "利用規約",
|
|
@@ -1355,15 +1355,15 @@
|
|
|
1355
1355
|
"tds_refund_login_restrict_title": "暫時無法進入遊戲",
|
|
1356
1356
|
"tds_refund_login_restrict_sub_title": "將所有退款訂單補款完成後即可進入遊戲",
|
|
1357
1357
|
"tds_refund_ios_pay_tip": "您有剩餘退款訂單無法在此系統進行補款,需要使用iOS系統登錄遊戲後進行補款",
|
|
1358
|
-
"tds_pay_success": "
|
|
1359
|
-
"tds_pay_fail": "
|
|
1360
|
-
"tds_pay_cancel": "
|
|
1358
|
+
"tds_pay_success": "操作完成",
|
|
1359
|
+
"tds_pay_fail": "操作失敗",
|
|
1360
|
+
"tds_pay_cancel": "使用者已取消",
|
|
1361
1361
|
"tds_button_confirm": "確認",
|
|
1362
1362
|
"tds_promotion_exchange_title": "領取商品",
|
|
1363
1363
|
"tds_promotion_exchange_desc": "你已經擁有該商品 ,是否發放給本角色",
|
|
1364
1364
|
"tds_refund_android_pay_tip": "您有剩餘退款訂單無法在此系統進行補款,需要使用Android系統登錄遊戲後進行補款",
|
|
1365
1365
|
"tds_refund_all_pay_tip": "您有剩餘退款訂單無法在此系統進行補款,需要使用Android、iOS系統登錄遊戲後進行補款",
|
|
1366
|
-
"tds_pay_net_fail": "
|
|
1366
|
+
"tds_pay_net_fail": "網路異常,請稍後重試",
|
|
1367
1367
|
"tds_refund_net_fail": "網路異常,補款失敗",
|
|
1368
1368
|
"tds_purchase_processing": "該訂單正在處理中,請稍後",
|
|
1369
1369
|
"tds_terms_agreement": "條款協議",
|
|
@@ -1496,15 +1496,15 @@
|
|
|
1496
1496
|
"tds_refund_login_restrict_title": "Unable to access the game at the moment",
|
|
1497
1497
|
"tds_refund_login_restrict_sub_title": "Complete payments for all refunded orders to access the game",
|
|
1498
1498
|
"tds_refund_ios_pay_tip": "Some of your refunded orders can't be repaid in this system. Please log in via an iOS device to complete the payment",
|
|
1499
|
-
"tds_pay_success": "
|
|
1500
|
-
"tds_pay_fail": "
|
|
1501
|
-
"tds_pay_cancel": "
|
|
1499
|
+
"tds_pay_success": "Operation completed",
|
|
1500
|
+
"tds_pay_fail": "Operation failed",
|
|
1501
|
+
"tds_pay_cancel": "User canceled",
|
|
1502
1502
|
"tds_button_confirm": "Confirm",
|
|
1503
1503
|
"tds_promotion_exchange_title": "Claim Item",
|
|
1504
1504
|
"tds_promotion_exchange_desc": "You already have this item. Sure to send same item to current character?",
|
|
1505
1505
|
"tds_refund_android_pay_tip": "Some of your refunded orders can't be repaid in this system. Please log in via an Android device to complete the payment",
|
|
1506
1506
|
"tds_refund_all_pay_tip": "Some of your refunded orders can't be repaid in this system. Please log in via an Android、iOS device to complete the payment",
|
|
1507
|
-
"tds_pay_net_fail": "Network error
|
|
1507
|
+
"tds_pay_net_fail": "Network error, please try again later",
|
|
1508
1508
|
"tds_refund_net_fail": "Network error. Failed to repay",
|
|
1509
1509
|
"tds_purchase_processing": "The order is being processed. Please wait",
|
|
1510
1510
|
"tds_terms_agreement": "Terms and conditions",
|
|
@@ -1637,15 +1637,15 @@
|
|
|
1637
1637
|
"tds_refund_login_restrict_title": "ไม่สามารถเข้าเกมได้ชั่วคราว",
|
|
1638
1638
|
"tds_refund_login_restrict_sub_title": "หลังจากชำระเงินเพิ่มเติมครบถ้วนแล้วจึงสามารถเข้าเกมได้",
|
|
1639
1639
|
"tds_refund_ios_pay_tip": "คำสั่งซื้อที่ขอเงินคืนบางรายการไม่สามารถชำระคืนได้ในระบบนี้ กรุณาเข้าสู่ระบบผ่านอุปกรณ์ iOS เพื่อทำการชำระเงิน",
|
|
1640
|
-
"tds_pay_success": "
|
|
1641
|
-
"tds_pay_fail": "
|
|
1642
|
-
"tds_pay_cancel": "
|
|
1640
|
+
"tds_pay_success": "ดำเนินการเสร็จสิ้น",
|
|
1641
|
+
"tds_pay_fail": "ดำเนินการล้มเหลว",
|
|
1642
|
+
"tds_pay_cancel": "ผู้ใช้ยกเลิก",
|
|
1643
1643
|
"tds_button_confirm": "ยืนยัน",
|
|
1644
1644
|
"tds_promotion_exchange_title": "รับไอเทม",
|
|
1645
1645
|
"tds_promotion_exchange_desc": "คุณมีไอเทมชิ้นนี้อยู่แล้ว กรุณายืนยันว่าจะส่งไอเทมชิ้นเดิมให้กับตัวละครปัจจุบัน",
|
|
1646
1646
|
"tds_refund_android_pay_tip": "คำสั่งซื้อที่ขอเงินคืนบางรายการไม่สามารถชำระคืนได้ในระบบนี้ กรุณาเข้าสู่ระบบผ่านอุปกรณ์แอนดรอยด์เพื่อทำการชำระเงิน",
|
|
1647
1647
|
"tds_refund_all_pay_tip": "คุณมีคำสั่งซื้อคืนเงินคงเหลือที่ไม่สามารถชำระคืนได้ในระบบนี้ คุณต้องลงชื่อเข้าใช้เกมด้วยระบบ Android และ iOS เพื่อเติมเงิน",
|
|
1648
|
-
"tds_pay_net_fail": "
|
|
1648
|
+
"tds_pay_net_fail": "เครือข่ายผิดพลาด โปรดลองอีกครั้งในภายหลัง",
|
|
1649
1649
|
"tds_refund_net_fail": "การเชื่อมต่อผิดพลาด ชำระเงินเพิ่มเติมล้มเหลว",
|
|
1650
1650
|
"tds_purchase_processing": "กรุณารอสักครู่ ระหว่างระบบกำลังดำเนินการ",
|
|
1651
1651
|
"tds_terms_agreement": "ข้อกำหนด",
|
|
@@ -1778,15 +1778,15 @@
|
|
|
1778
1778
|
"tds_refund_login_restrict_title": "Saat ini tidak bisa masuk ke dalam game",
|
|
1779
1779
|
"tds_refund_login_restrict_sub_title": "Setelah menyelesaikan semua transaksi refund, Anda baru dapat memasuki game",
|
|
1780
1780
|
"tds_refund_ios_pay_tip": "Pembayaran pesanan yang dikembalikan tidak bisa dikembalikan melalui sistem ini. Mohon login melalui perangkat iOS untuk menyelesaikan pembayaran",
|
|
1781
|
-
"tds_pay_success": "
|
|
1782
|
-
"tds_pay_fail": "
|
|
1783
|
-
"tds_pay_cancel": "
|
|
1781
|
+
"tds_pay_success": "Operasi selesai",
|
|
1782
|
+
"tds_pay_fail": "Operasi gagal",
|
|
1783
|
+
"tds_pay_cancel": "Dibatalkan oleh pengguna",
|
|
1784
1784
|
"tds_button_confirm": "Konfirmasi",
|
|
1785
1785
|
"tds_promotion_exchange_title": "Ambil Item",
|
|
1786
1786
|
"tds_promotion_exchange_desc": "Kamu sudah memiliki item ini, berikan kepada karakter ini?",
|
|
1787
1787
|
"tds_refund_android_pay_tip": "Pembayaran pesanan yang dikembalikan tidak bisa dikembalikan melalui sistem ini. Mohon login melalui perangkat Android untuk menyelesaikan pembayaran",
|
|
1788
1788
|
"tds_refund_all_pay_tip": "Pembayaran pesanan yang dikembalikan tidak bisa dikembalikan melalui sistem ini. Mohon login melalui perangkat Android、iOS untuk menyelesaikan pembayaran",
|
|
1789
|
-
"tds_pay_net_fail": "
|
|
1789
|
+
"tds_pay_net_fail": "Kesalahan jaringan, silakan coba lagi nanti",
|
|
1790
1790
|
"tds_refund_net_fail": "Jaringan tidak normal, repay gagal",
|
|
1791
1791
|
"tds_purchase_processing": "Pesanan sedang diproses, mohon tunggu",
|
|
1792
1792
|
"tds_terms_agreement": "Perjanjian Persyaratan",
|
|
@@ -1919,15 +1919,15 @@
|
|
|
1919
1919
|
"tds_refund_login_restrict_title": "Tạm thời không thể vào trò chơi",
|
|
1920
1920
|
"tds_refund_login_restrict_sub_title": "Vui lòng thanh toán bổ sung tất cả các khoản hoàn tiền để vào trò chơi",
|
|
1921
1921
|
"tds_refund_ios_pay_tip": "Bạn còn khoản hoàn tiền, không thể thanh toán bổ sung trong hệ thống này. Vui lòng đăng nhập vào trò chơi bằng hệ thống iOS để thực hiện thanh toán.",
|
|
1922
|
-
"tds_pay_success": "
|
|
1923
|
-
"tds_pay_fail": "
|
|
1924
|
-
"tds_pay_cancel": "
|
|
1922
|
+
"tds_pay_success": "Thao tác hoàn thành",
|
|
1923
|
+
"tds_pay_fail": "Thao tác thất bại",
|
|
1924
|
+
"tds_pay_cancel": "Người dùng đã hủy",
|
|
1925
1925
|
"tds_button_confirm": "Xác nhận",
|
|
1926
1926
|
"tds_promotion_exchange_title": "Nhận hàng",
|
|
1927
1927
|
"tds_promotion_exchange_desc": "Bạn đã có mặt hàng này, xác nhận dùng cho nhân vật này?",
|
|
1928
1928
|
"tds_refund_android_pay_tip": "Bạn còn khoản hoàn tiền, không thể thanh toán bổ sung trong hệ thống này. Vui lòng đăng nhập vào trò chơi bằng hệ thống Android/iOS để thực hiện thanh toán.",
|
|
1929
1929
|
"tds_refund_all_pay_tip": "Bạn còn khoản hoàn tiền, không thể thanh toán bổ sung trong hệ thống này. Vui lòng đăng nhập vào trò chơi bằng hệ thống Android để thực hiện thanh toán.",
|
|
1930
|
-
"tds_pay_net_fail": "Lỗi mạng,
|
|
1930
|
+
"tds_pay_net_fail": "Lỗi mạng, vui lòng thử lại sau",
|
|
1931
1931
|
"tds_refund_net_fail": "Lỗi mạng, bổ sung thất bại",
|
|
1932
1932
|
"tds_purchase_processing": "Đơn hàng đang được xử lý, vui lòng đợi",
|
|
1933
1933
|
"tds_terms_agreement": "Thỏa thuận điều khoản",
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
// The SteamManager is designed to work with Steamworks.NET
|
|
2
|
+
// This file is released into the public domain.
|
|
3
|
+
// Where that dedication is not recognized you are granted a perpetual,
|
|
4
|
+
// irrevocable license to copy and modify this file as you see fit.
|
|
5
|
+
//
|
|
6
|
+
// Version: 1.0.12
|
|
7
|
+
|
|
8
|
+
#if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX)
|
|
9
|
+
#define DISABLESTEAMWORKS
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
using UnityEngine;
|
|
13
|
+
#if !DISABLESTEAMWORKS
|
|
14
|
+
using System;
|
|
15
|
+
using System.IO;
|
|
16
|
+
using System.Collections;
|
|
17
|
+
using Steamworks;
|
|
18
|
+
using Newtonsoft.Json.Linq;
|
|
19
|
+
using XD.SDK.Common;
|
|
20
|
+
#endif
|
|
21
|
+
|
|
22
|
+
//
|
|
23
|
+
// The SteamManager provides a base implementation of Steamworks.NET on which you can build upon.
|
|
24
|
+
// It handles the basics of starting up and shutting down the SteamAPI for use.
|
|
25
|
+
//
|
|
26
|
+
[DisallowMultipleComponent]
|
|
27
|
+
class SteamManager : MonoBehaviour {
|
|
28
|
+
#if !DISABLESTEAMWORKS
|
|
29
|
+
|
|
30
|
+
private static AppId_t _appID = AppId_t.Invalid;
|
|
31
|
+
private static bool _startFromSteam = false;
|
|
32
|
+
|
|
33
|
+
protected static bool s_EverInitialized = false;
|
|
34
|
+
|
|
35
|
+
protected static SteamManager s_instance;
|
|
36
|
+
protected static SteamManager Instance {
|
|
37
|
+
get {
|
|
38
|
+
if (s_instance == null) {
|
|
39
|
+
return new GameObject("SteamManager").AddComponent<SteamManager>();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return s_instance;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
protected bool m_bInitialized = false;
|
|
48
|
+
public static bool Initialized {
|
|
49
|
+
get {
|
|
50
|
+
return Instance.m_bInitialized;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
protected SteamAPIWarningMessageHook_t m_SteamAPIWarningMessageHook;
|
|
55
|
+
|
|
56
|
+
[AOT.MonoPInvokeCallback(typeof(SteamAPIWarningMessageHook_t))]
|
|
57
|
+
protected static void SteamAPIDebugTextHook(int nSeverity, System.Text.StringBuilder pchDebugText) {
|
|
58
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, pchDebugText.ToString(), true);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// #if UNITY_2019_3_OR_NEWER
|
|
62
|
+
// // In case of disabled Domain Reload, reset static members before entering Play Mode.
|
|
63
|
+
// [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
|
64
|
+
// private static void InitOnPlayMode()
|
|
65
|
+
// {
|
|
66
|
+
// s_appID = AppId_t.Invalid;
|
|
67
|
+
// s_EverInitialized = false;
|
|
68
|
+
// s_instance = null;
|
|
69
|
+
// }
|
|
70
|
+
// #endif
|
|
71
|
+
|
|
72
|
+
protected virtual void Awake() {
|
|
73
|
+
if (!_startFromSteam)
|
|
74
|
+
{
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, "[Steamworks.NET] SteamManager Awake", true);
|
|
78
|
+
// Only one instance of SteamManager at a time!
|
|
79
|
+
if (s_instance != null) {
|
|
80
|
+
Destroy(gameObject);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
s_instance = this;
|
|
84
|
+
|
|
85
|
+
if(s_EverInitialized) {
|
|
86
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] Tried to Initialize the SteamAPI twice in one session!", true);
|
|
87
|
+
// This is almost always an error.
|
|
88
|
+
// The most common case where this happens is when SteamManager gets destroyed because of Application.Quit(),
|
|
89
|
+
// and then some Steamworks code in some other OnDestroy gets called afterwards, creating a new SteamManager.
|
|
90
|
+
// You should never call Steamworks functions in OnDestroy, always prefer OnDisable if possible.
|
|
91
|
+
throw new System.Exception("Tried to Initialize the SteamAPI twice in one session!");
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// We want our SteamManager Instance to persist across scenes.
|
|
95
|
+
DontDestroyOnLoad(gameObject);
|
|
96
|
+
|
|
97
|
+
if (!Packsize.Test()) {
|
|
98
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] Packsize Test returned false, the wrong version of Steamworks.NET is being run in this platform.", true);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (!DllCheck.Test()) {
|
|
102
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] DllCheck Test returned false, One or more of the Steamworks binaries seems to be the wrong version.", true);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
// If Steam is not running or the game wasn't started through Steam, SteamAPI_RestartAppIfNecessary starts the
|
|
107
|
+
// Steam client and also launches this game again if the User owns it. This can act as a rudimentary form of DRM.
|
|
108
|
+
|
|
109
|
+
// Once you get a Steam AppID assigned by Valve, you need to replace AppId_t.Invalid with it and
|
|
110
|
+
// remove steam_appid.txt from the game depot. eg: "(AppId_t)480" or "new AppId_t(480)".
|
|
111
|
+
// See the Valve documentation for more information: https://partner.steamgames.com/doc/sdk/api#initialization_and_shutdown
|
|
112
|
+
if (SteamAPI.RestartAppIfNecessary(_appID)) {
|
|
113
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] Shutting down because RestartAppIfNecessary returned true. Steam will restart the application.", true);
|
|
114
|
+
Application.Quit();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch (System.DllNotFoundException e) { // We catch this exception here, as it will be the first occurrence of it.
|
|
119
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It's likely not in the correct location. Refer to the README for more details.\n" + e, true);
|
|
120
|
+
|
|
121
|
+
Application.Quit();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Initializes the Steamworks API.
|
|
126
|
+
// If this returns false then this indicates one of the following conditions:
|
|
127
|
+
// [*] The Steam client isn't running. A running Steam client is required to provide implementations of the various Steamworks interfaces.
|
|
128
|
+
// [*] The Steam client couldn't determine the App ID of game. If you're running your application from the executable or debugger directly then you must have a [code-inline]steam_appid.txt[/code-inline] in your game directory next to the executable, with your app ID in it and nothing else. Steam will look for this file in the current working directory. If you are running your executable from a different directory you may need to relocate the [code-inline]steam_appid.txt[/code-inline] file.
|
|
129
|
+
// [*] Your application is not running under the same OS user context as the Steam client, such as a different user or administration access level.
|
|
130
|
+
// [*] Ensure that you own a license for the App ID on the currently active Steam account. Your game must show up in your Steam library.
|
|
131
|
+
// [*] Your App ID is not completely set up, i.e. in Release State: Unavailable, or it's missing default packages.
|
|
132
|
+
// Valve's documentation for this is located here:
|
|
133
|
+
// https://partner.steamgames.com/doc/sdk/api#initialization_and_shutdown
|
|
134
|
+
m_bInitialized = SteamAPI.Init();
|
|
135
|
+
if (!m_bInitialized) {
|
|
136
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.", true);
|
|
137
|
+
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, "[Steamworks.NET] SteamAPI_Init() succeeded.", true);
|
|
141
|
+
|
|
142
|
+
s_EverInitialized = true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// This should only ever get called on first load and after an Assembly reload, You should never Disable the Steamworks Manager yourself.
|
|
146
|
+
protected virtual void OnEnable() {
|
|
147
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, "[Steamworks.NET] SteamManager OnEnable", true);
|
|
148
|
+
if (s_instance == null) {
|
|
149
|
+
s_instance = this;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (!m_bInitialized) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (m_SteamAPIWarningMessageHook == null) {
|
|
157
|
+
// Set up our callback to receive warning messages from Steam.
|
|
158
|
+
// You must launch with "-debug_steamapi" in the launch args to receive warnings.
|
|
159
|
+
m_SteamAPIWarningMessageHook = new SteamAPIWarningMessageHook_t(SteamAPIDebugTextHook);
|
|
160
|
+
SteamClient.SetWarningMessageHook(m_SteamAPIWarningMessageHook);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// OnApplicationQuit gets called too early to shutdown the SteamAPI.
|
|
165
|
+
// Because the SteamManager should be persistent and never disabled or destroyed we can shutdown the SteamAPI here.
|
|
166
|
+
// Thus it is not recommended to perform any Steamworks work in other OnDestroy functions as the order of execution can not be garenteed upon Shutdown. Prefer OnDisable().
|
|
167
|
+
protected virtual void OnDestroy() {
|
|
168
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, "[Steamworks.NET] SteamManager OnDestroy", true);
|
|
169
|
+
if (s_instance != this) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
s_instance = null;
|
|
174
|
+
|
|
175
|
+
if (!m_bInitialized) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
SteamAPI.Shutdown();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
protected virtual void Update() {
|
|
183
|
+
if (!m_bInitialized) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Run Steam client callbacks
|
|
188
|
+
SteamAPI.RunCallbacks();
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
#region XDSDK
|
|
192
|
+
|
|
193
|
+
/* 初始化Steam 环境
|
|
194
|
+
* 1. XDConfig.json中配置了steam_id
|
|
195
|
+
* 2. 程序启动参数中包含 from=steam 或者配置文件 XDStart 内容包含 from=steam
|
|
196
|
+
*/
|
|
197
|
+
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
|
198
|
+
private static void InitXdSteam()
|
|
199
|
+
{
|
|
200
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, "[Steamworks.NET] InitXdSteam", true);
|
|
201
|
+
// In case of disabled Domain Reload, reset static members before entering Play Mode.
|
|
202
|
+
_appID = AppId_t.Invalid;
|
|
203
|
+
_startFromSteam = false;
|
|
204
|
+
s_EverInitialized = false;
|
|
205
|
+
s_instance = null;
|
|
206
|
+
|
|
207
|
+
var steamIdLoaded = LoadXdSteamID();
|
|
208
|
+
if (!steamIdLoaded)
|
|
209
|
+
{
|
|
210
|
+
XDGLogger.Log(XDGLogLevel.Debug, "[Steamworks.NET]", " XDConfig.json steam_id not loaded, skip Steam init.");
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
var fromCmd = GetCommandArgument("from");
|
|
215
|
+
if (!string.IsNullOrEmpty(fromCmd) && string.Equals(fromCmd, "steam", StringComparison.OrdinalIgnoreCase))
|
|
216
|
+
{
|
|
217
|
+
_startFromSteam = true;
|
|
218
|
+
}
|
|
219
|
+
else
|
|
220
|
+
{
|
|
221
|
+
var configPath = LoadFilePath("XDStart");
|
|
222
|
+
if (!string.IsNullOrEmpty(configPath))
|
|
223
|
+
{
|
|
224
|
+
try
|
|
225
|
+
{
|
|
226
|
+
var configContent = File.ReadAllText(configPath);
|
|
227
|
+
if (configContent.Contains("from=steam"))
|
|
228
|
+
{
|
|
229
|
+
_startFromSteam = true;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
catch (Exception e)
|
|
233
|
+
{
|
|
234
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, $"[Steamworks.NET] Failed to read XDStart. {e}", true);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else
|
|
238
|
+
{
|
|
239
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, "[Steamworks.NET] XDStart not found, skip from=steam check.", true);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (_startFromSteam)
|
|
244
|
+
{
|
|
245
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, $"[Steamworks.NET] XD SteamID loaded: {_appID}, initializing Steam.", true);
|
|
246
|
+
if (SteamAPI.RestartAppIfNecessary(_appID))
|
|
247
|
+
{
|
|
248
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] Shutting down because RestartAppIfNecessary returned true. Steam will restart the application.", true);
|
|
249
|
+
Application.Quit();
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
if (!SteamAPI.Init())
|
|
254
|
+
{
|
|
255
|
+
XDGLogger.Log(XDGLogLevel.Error, XDGLoggerTag.Common, "[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.", true);
|
|
256
|
+
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
else
|
|
261
|
+
{
|
|
262
|
+
XDGLogger.Log(XDGLogLevel.Debug, XDGLoggerTag.Common, $"[Steamworks.NET] Not started from Steam, skip Steam init.", true);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
private static string GetCommandArgument(string name)
|
|
267
|
+
{
|
|
268
|
+
var args = System.Environment.GetCommandLineArgs();
|
|
269
|
+
foreach (string arg in args)
|
|
270
|
+
{
|
|
271
|
+
var sepIndex = arg.IndexOf('=');
|
|
272
|
+
if (sepIndex <= 0 || sepIndex == arg.Length - 1)
|
|
273
|
+
{
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
var key = arg.Substring(0, sepIndex);
|
|
277
|
+
var value = arg.Substring(sepIndex + 1);
|
|
278
|
+
if (string.Equals(key, name, StringComparison.OrdinalIgnoreCase))
|
|
279
|
+
{
|
|
280
|
+
return value;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
private static string LoadFilePath(string filename)
|
|
287
|
+
{
|
|
288
|
+
if (string.IsNullOrEmpty(filename))
|
|
289
|
+
{
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
var streamingAssetsPath = Path.Combine(Application.streamingAssetsPath, filename);
|
|
293
|
+
if (File.Exists(streamingAssetsPath))
|
|
294
|
+
{
|
|
295
|
+
return streamingAssetsPath;
|
|
296
|
+
}
|
|
297
|
+
var dataPath = Path.Combine(Application.dataPath, filename);
|
|
298
|
+
if (File.Exists(dataPath))
|
|
299
|
+
{
|
|
300
|
+
return dataPath;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
private static bool LoadXdSteamID()
|
|
307
|
+
{
|
|
308
|
+
var configPath = LoadFilePath("XDConfig.json");
|
|
309
|
+
|
|
310
|
+
if (string.IsNullOrEmpty(configPath))
|
|
311
|
+
{
|
|
312
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, $"[Steamworks.NET] XDConfig.json not found", true);
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
try
|
|
317
|
+
{
|
|
318
|
+
var json = File.ReadAllText(configPath);
|
|
319
|
+
var jsonObject = JObject.Parse(json);
|
|
320
|
+
var steamIDRaw = jsonObject["steam_id"]?.ToString();
|
|
321
|
+
|
|
322
|
+
ulong steamIDValue = 0;
|
|
323
|
+
if (!string.IsNullOrEmpty(steamIDRaw) && !ulong.TryParse(steamIDRaw, out steamIDValue))
|
|
324
|
+
{
|
|
325
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, $"[Steamworks.NET] steam_id invalid: {steamIDRaw}", true);
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (steamIDValue == 0)
|
|
330
|
+
{
|
|
331
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, "[Steamworks.NET] steam_id missing in XDConfig.json", true);
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (steamIDValue > uint.MaxValue)
|
|
336
|
+
{
|
|
337
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, $"[Steamworks.NET] steam_id exceeds uint range: {steamIDValue}", true);
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
_appID = new AppId_t((uint)steamIDValue);
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
catch (Exception e)
|
|
345
|
+
{
|
|
346
|
+
XDGLogger.Log(XDGLogLevel.Warn, XDGLoggerTag.Common, $"[Steamworks.NET] Failed to read XDConfig.json. {e}", true);
|
|
347
|
+
return false;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
#endregion
|
|
351
|
+
#else
|
|
352
|
+
public static bool Initialized {
|
|
353
|
+
get {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
#endif // !DISABLESTEAMWORKS
|
|
358
|
+
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
fileFormatVersion: 2
|
|
2
|
-
guid:
|
|
2
|
+
guid: 05013cd61597e43a1a748e988e4ad980
|
|
3
3
|
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
4
|
serializedVersion: 2
|
|
6
5
|
defaultReferences: []
|
|
7
6
|
executionOrder: 0
|
|
8
7
|
icon: {instanceID: 0}
|
|
9
8
|
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
#if
|
|
1
|
+
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
2
2
|
using System;
|
|
3
3
|
using System.Collections.Generic;
|
|
4
4
|
using System.Collections.Concurrent;
|
|
5
|
-
using System.Linq;
|
|
6
|
-
using System.Reflection;
|
|
7
5
|
using System.Threading.Tasks;
|
|
8
|
-
using Steamworks;
|
|
9
6
|
using Newtonsoft.Json;
|
|
7
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
8
|
+
using Steamworks;
|
|
9
|
+
#endif
|
|
10
10
|
|
|
11
11
|
namespace XD.SDK.Common.Internal.Standalone
|
|
12
12
|
{
|
|
13
|
-
public class SteamWrapper
|
|
13
|
+
public class SteamWrapper
|
|
14
14
|
{
|
|
15
|
+
private static readonly Lazy<SteamWrapper> lazyInstance = new Lazy<SteamWrapper>(() => new SteamWrapper());
|
|
16
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
15
17
|
private readonly Callback<GetAuthSessionTicketResponse_t> getAuthSessionTicketResponseCallback;
|
|
16
18
|
private readonly ConcurrentDictionary<HAuthTicket, Tuple<TaskCompletionSource<string>, string>> tickTasks;
|
|
17
19
|
|
|
18
20
|
private readonly Callback<MicroTxnAuthorizationResponse_t> mircoTxnAuthorizationCallback;
|
|
19
21
|
private readonly ConcurrentDictionary<ulong, TaskCompletionSource<string>> microTxnTasks;
|
|
20
|
-
|
|
22
|
+
#endif
|
|
23
|
+
public static SteamWrapper Instance => lazyInstance.Value;
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
private SteamWrapper()
|
|
23
26
|
{
|
|
27
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
24
28
|
tickTasks = new ConcurrentDictionary<HAuthTicket, Tuple<TaskCompletionSource<string>, string>>();
|
|
25
29
|
|
|
26
30
|
getAuthSessionTicketResponseCallback = Callback<GetAuthSessionTicketResponse_t>.Create((GetAuthSessionTicketResponse_t pCallback) =>
|
|
@@ -57,32 +61,26 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
#endif
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public static bool Initialized()
|
|
68
|
+
{
|
|
69
|
+
return SteamManager.Initialized;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
|
-
private
|
|
72
|
+
private static void EnsureInitialized()
|
|
67
73
|
{
|
|
68
|
-
|
|
69
|
-
if (_steamManagerType == null) return false;
|
|
70
|
-
var prop = _steamManagerType.GetProperty("Initialized", BindingFlags.Public | BindingFlags.Static);
|
|
71
|
-
if (prop != null)
|
|
74
|
+
if (!SteamManager.Initialized)
|
|
72
75
|
{
|
|
73
|
-
|
|
76
|
+
throw new Exception("Steam did not initialize, it may be disabled by config or failed to start.");
|
|
74
77
|
}
|
|
75
|
-
return initialized;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
public Task<string> GetAuthTicket()
|
|
79
81
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
throw new Exception("Steam did not initialize.");
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
83
|
+
EnsureInitialized();
|
|
86
84
|
TaskCompletionSource<string> tcs = new TaskCompletionSource<string>();
|
|
87
85
|
|
|
88
86
|
byte[] data = new byte[1024];
|
|
@@ -90,8 +88,11 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
90
88
|
string ticket = BitConverter.ToString(data, 0, (int)ticketLength)
|
|
91
89
|
.Replace("-", string.Empty);
|
|
92
90
|
tickTasks.TryAdd(hTicket, new Tuple<TaskCompletionSource<string>, string>(tcs, ticket));
|
|
93
|
-
|
|
91
|
+
|
|
94
92
|
return tcs.Task;
|
|
93
|
+
#else
|
|
94
|
+
throw new Exception("Steam is not supported on iOS/Android platform.");
|
|
95
|
+
#endif
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
/// <summary>
|
|
@@ -101,65 +102,63 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
101
102
|
/// <returns></returns>
|
|
102
103
|
public Task<string> GetMicroTxn(ulong orderId)
|
|
103
104
|
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
throw new Exception("Steam did not initialize.");
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
106
|
+
EnsureInitialized();
|
|
110
107
|
TaskCompletionSource<string> tcs = new TaskCompletionSource<string>();
|
|
111
108
|
microTxnTasks.TryAdd(orderId, tcs);
|
|
112
109
|
return tcs.Task;
|
|
110
|
+
#else
|
|
111
|
+
throw new Exception("Steam is not supported on iOS/Android platform.");
|
|
112
|
+
#endif
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
public string GetSteamId()
|
|
116
116
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
throw new Exception("Steam did not initialize.");
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
118
|
+
EnsureInitialized();
|
|
123
119
|
try
|
|
124
120
|
{
|
|
125
121
|
CSteamID steamID = SteamUser.GetSteamID();
|
|
126
122
|
return steamID.ToString();
|
|
127
123
|
}
|
|
128
|
-
catch (Exception
|
|
124
|
+
catch (Exception)
|
|
129
125
|
{
|
|
130
126
|
XDGLogger.Error("当前开启 XD_STEAM_SUPPORT,但没有 Steam 环境", XDGLoggerTag.Common);
|
|
131
127
|
return null;
|
|
132
128
|
}
|
|
129
|
+
#else
|
|
130
|
+
throw new Exception("Steam is not supported on iOS/Android platform.");
|
|
131
|
+
#endif
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
public string GetSteamLanguage()
|
|
136
135
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
throw new Exception("Steam did not initialize.");
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
137
|
+
EnsureInitialized();
|
|
143
138
|
return SteamApps.GetCurrentGameLanguage();
|
|
139
|
+
#else
|
|
140
|
+
throw new Exception("Steam is not supported on iOS/Android platform.");
|
|
141
|
+
#endif
|
|
144
142
|
}
|
|
145
143
|
|
|
146
144
|
public string GetSteamCountry()
|
|
147
145
|
{
|
|
146
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
148
147
|
if (!Initialized())
|
|
149
148
|
{
|
|
150
|
-
|
|
149
|
+
return null;
|
|
151
150
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
151
|
try
|
|
155
152
|
{
|
|
156
153
|
return Steamworks.SteamUtils.GetIPCountry();
|
|
157
154
|
}
|
|
158
|
-
catch (Exception
|
|
155
|
+
catch (Exception)
|
|
159
156
|
{
|
|
160
|
-
XDGLogger.Error("当前开启 XD_STEAM_SUPPORT,但没有 Steam 环境", XDGLoggerTag.Common);
|
|
161
157
|
return null;
|
|
162
158
|
}
|
|
159
|
+
#else
|
|
160
|
+
throw new Exception("Steam is not supported on iOS/Android platform.");
|
|
161
|
+
#endif
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
164
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.xd.sdk.common",
|
|
3
3
|
"displayName": "XDGSDK Common",
|
|
4
|
-
"version": "7.2.
|
|
4
|
+
"version": "7.2.1-alpha",
|
|
5
5
|
"description": "XDGSDK",
|
|
6
6
|
"unity": "2019.3",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"com.xd.sdk.foundation": "7.2.
|
|
9
|
+
"com.xd.sdk.foundation": "7.2.1-alpha"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
2
|
-
using System;
|
|
3
|
-
using System.Linq;
|
|
4
|
-
using System.Threading.Tasks;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace XD.SDK.Common.Internal.Standalone
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
/// Steam SDK 封装接口
|
|
11
|
-
/// </summary>
|
|
12
|
-
public interface ISteamSDKWrapper
|
|
13
|
-
{
|
|
14
|
-
Task<string> GetAuthTicket();
|
|
15
|
-
string GetSteamId();
|
|
16
|
-
string GetSteamLanguage();
|
|
17
|
-
Task<string> GetMicroTxn(ulong orderId);
|
|
18
|
-
string GetSteamCountry();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
public class SteamUtils
|
|
22
|
-
{
|
|
23
|
-
public static ISteamSDKWrapper Instance { get; private set; }
|
|
24
|
-
|
|
25
|
-
static SteamUtils()
|
|
26
|
-
{
|
|
27
|
-
Type interfaceType = typeof(ISteamSDKWrapper);
|
|
28
|
-
Type steamWrapperType = AppDomain.CurrentDomain.GetAssemblies()
|
|
29
|
-
.SelectMany(assembly => assembly.GetTypes())
|
|
30
|
-
.FirstOrDefault(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass);
|
|
31
|
-
if (steamWrapperType != null)
|
|
32
|
-
{
|
|
33
|
-
Instance = Activator.CreateInstance(steamWrapperType) as ISteamSDKWrapper;
|
|
34
|
-
}
|
|
35
|
-
else
|
|
36
|
-
{
|
|
37
|
-
XDGLogger.Warn($"No class implements {interfaceType} Type. Current Platform: {Application.platform}, if you are using Editor, please check if you have installed XDSDK pc module.", XDGLoggerTag.Common);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
/// 是否有 SDK 支持,即 Steam 包
|
|
43
|
-
/// </summary>
|
|
44
|
-
public static bool IsSDKSupported => Instance != null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
#endif
|
|
File without changes
|