Compare commits

..

No commits in common. "6f9db3c84fe63c84a6730b7ca50695aba48b2197" and "b144fee5af0c53d41eb1c0e35977754fdf3473bb" have entirely different histories.

8 changed files with 3 additions and 68 deletions

View File

@ -1 +1 @@
5
4

View File

@ -21854,7 +21854,6 @@ GameObject:
- component: {fileID: 500962030}
- component: {fileID: 500962029}
- component: {fileID: 500962031}
- component: {fileID: 500962032}
m_Layer: 0
m_Name: Infos
m_TagString: Untagged
@ -22016,19 +22015,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4177bc10460c0264eb933d4c43a6f313, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &500962032
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 500962021}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 36517ed5b97a5fc43b782b438a60e64d, type: 3}
m_Name:
m_EditorClassIdentifier:
webhookUrl: https://discord.com/api/webhooks/1458685956029939905/mjzyM7JuC7KWIjR4INNpGNCUK2EKanBace1nuwd114E5VIicTvrB3IKHSuI22ID0AtlP
--- !u!1 &503960960
GameObject:
m_ObjectHideFlags: 0

View File

@ -1,33 +0,0 @@
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class DiscordWebhookSender : MonoBehaviourSingletonTemplate<DiscordWebhookSender>
{
[SerializeField] private string webhookUrl;
public void Send_Message(string message)
{
StartCoroutine(SendCoroutine(message));
}
IEnumerator SendCoroutine(string message)
{
string json = "{\"content\":\"" + message + "\"}";
//Debug.Log("DiscordWebhookSender : " + json);
using (UnityWebRequest request = new UnityWebRequest(webhookUrl, "POST"))
{
byte[] bodyRaw = System.Text.Encoding.UTF8.GetBytes(json);
request.uploadHandler = new UploadHandlerRaw(bodyRaw);
request.downloadHandler = new DownloadHandlerBuffer();
request.SetRequestHeader("Content-Type", "application/json");
yield return request.SendWebRequest();
//Debug.Log("DiscordWebhookSender Result : " + request.result);
if (request.result != UnityWebRequest.Result.Success)
Debug.LogError("Discord Error: " + request.error);
}
}
}

View File

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 36517ed5b97a5fc43b782b438a60e64d

View File

@ -3,13 +3,11 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Newtonsoft.Json;
using OneStore.Auth;
using OneStore.Common;
using OneStore.Purchasing;
using UnityEngine;
using UnityEngine.Purchasing;
using UnityEngine.Purchasing.MiniJSON;
public class InappInfo : MonoBehaviourSingletonTemplate<InappInfo>
{
@ -109,18 +107,9 @@ public class InappInfo : MonoBehaviourSingletonTemplate<InappInfo>
private void OnPurchaseConfirmed(Order order)
{
//NetWait.Ins.Set(false);
var id = order.CartOrdered.Items().First().Product.definition.id;
var data = table_shop.Ins.Get_Data(id);
//Debug.Log($"Purchase confirmed : {id}");
var json = JsonUtility.FromJson<OrderReceipt>(order.Info.Receipt);
//Debug.Log($"order.Info.Receipt : {json.Payload}");
#if UNITY_ANDROID && !UNITY_EDITOR
DiscordWebhookSender.Ins.Send_Message($"[Google]{id} / {DSUtil.GetThousandCommaText(data.n_Price)}원 / {json.Payload}");
#endif
Debug.Log($"Purchase confirmed: {order.CartOrdered.Items().First().Product.definition.id}");
act_success?.Invoke();
}
class OrderReceipt { public string Payload; }
private void OnPurchaseFailed(FailedOrder order)
{
@ -179,10 +168,6 @@ public class InappInfo : MonoBehaviourSingletonTemplate<InappInfo>
act_success();
else
SaveMgr.Ins.list_inapp.Add(purchase.ProductId);
var data = table_shop.Ins.Get_Data(purchase.ProductId);
DiscordWebhookSender.Ins.Send_Message($"[OneStore, {Application.productName}, {purchase.PackageName}]" +
$"{purchase.ProductId} / {DSUtil.GetThousandCommaText(data.n_Price)}원 / {purchase.PurchaseToken}");
}
public void OnManageRecurringProduct(IapResult iapResult, PurchaseData purchase, RecurringAction action)

View File

@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Linq;
using GUPS.AntiCheat.Protected;
using Newtonsoft.Json;
using OneStore.Common;
using UnityEngine;
public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>

View File

@ -87,7 +87,7 @@ public static class AutoBuild
//PlayerSettings.Android.minSdkVersion = AndroidSdkVersions.AndroidApiLevel23;
EditorUserBuildSettings.buildAppBundle = false;
BuildStart("AndroidData/NightWard_OneStore_" + Application.version + "_(" + PlayerSettings.Android.bundleVersionCode + ").apk", BuildTarget.Android);
BuildStart("AndroidData/NightWard_Test_OneStore_" + Application.version + "_(" + PlayerSettings.Android.bundleVersionCode + ").apk", BuildTarget.Android);
EmptySymbol();
}
[MenuItem("AutoBuild/Build Live AAB")]