fix:1、删除max广告。2、更换sdk

This commit is contained in:
2026-05-27 10:41:05 +08:00
parent d4f6b82209
commit bd28506b1f
945 changed files with 23352 additions and 21625 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 42b11239795a857438cebb0b42577408
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 51f8b691978644845a59d4da09bb72e3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+33
View File
@@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7999829969770386720
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 520568642914021788}
m_Layer: 0
m_Name: Demo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &520568642914021788
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7999829969770386720}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5597cf0c8207a4448a9e84a8800d5cad
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,231 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
using TCJPLYRM1xJTSDK;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;
public class TCJPLYRM1xJTSDKDemo : MonoBehaviour
{
public void ShowReward()
{
TCJPLYRM1xJTSDKManager.Instance.ShowRewardVideo("TAG", b =>
{
Debug.LogError($"reward result = {b}");
},(() =>
{
Debug.LogError($"reward close!!!");
}));
}
public void ShowInter()
{
TCJPLYRM1xJTSDKManager.Instance.ShowInter("TAG", () =>
{
Debug.LogError("inter hide");
});
}
public void ShowAdmobInter()
{
TCJPLYRM1xJTSDKManager.Instance.ShowAdmobInter("TAG", () =>
{
Debug.LogError("inter hide");
});
}
public void ShowSplash()
{
TCJPLYRM1xJTSDKManager.Instance.ShowSplash();
}
public void CheckReward(Image btnImg)
{
var isReady = TCJPLYRM1xJTSDKManager.Instance.IsVideoReady();
btnImg.color = isReady ? Color.green : Color.white;
Debug.Log($"Reward : {isReady}");
}
public void CheckInter(Image btnImg)
{
var isReady = TCJPLYRM1xJTSDKManager.Instance.IsInterReady();
btnImg.color = isReady ? Color.green : Color.white;
Debug.Log($"Inter : {isReady}");
}
public void CheckSplash(Image btnImg)
{
var isReady = TCJPLYRM1xJTSDKManager.Instance.IsSplashReady();
btnImg.color = isReady ? Color.green : Color.white;
Debug.Log($"Splash : {isReady}");
}
public void Track()
{
TCJPLYRM1xJTSDKManager.Instance.Track("test", new Dictionary<string, string>()
{
{"evt1", "1"},
{"evt2", "2"},
{"evt3", "3"},
{"evt4", "4"},
{"evt5", "5"},
{"evt6", "6"},
{"evt7", "7"},
{"evt8", "8"},
{"evt9", "9"},
});
}
public void GetCountryCode()
{
var code = TCJPLYRM1xJTSDKManager.Instance.GetCountryCode();
Debug.Log($"country : {code}");
}
public void ShowH5()
{
TCJPLYRM1xJTSDKManager.Instance.H5.ShowH5((() =>
{
Debug.Log("H5 close");
}), () =>
{
Debug.Log($"H5 show failed!");
});
}
public void ShowH5(RectTransform rectTransform)
{
TCJPLYRM1xJTSDKManager.Instance.H5.ShowH5(rectTransform);
}
public void HideH5()
{
TCJPLYRM1xJTSDKManager.Instance.H5.HideH5();
}
public void CheckShowH5(Image btnImg)
{
var show = TCJPLYRM1xJTSDKManager.Instance.H5.IsShowH5();
btnImg.color = show ? Color.green : Color.red;
Debug.Log($"CheckShowH5 : {show}");
}
private int _level = 1;
public void TrackLevel()
{
TCJPLYRM1xJTSDKManager.Instance.TrackLevelUp(_level);
if (Random.Range(0, 100) < 50)
{
_level++;
}
}
private string withDrawSceneId = "";
public void GetWithDrawConfigs()
{
TCJPLYRM1xJTSDKManager.Instance.GetWithDrawConfigs(((b, s) =>
{
Debug.Log($"GetWithDrawConfigs result : {b}, data : {s}");
if (b)
{
var cfgs = JsonConvert.DeserializeObject<List<WithDrawConfig>>(s);
int idx = 0;
foreach (WithDrawConfig config in cfgs)
{
Debug.Log($"index = {idx}, {config.ToString()}");
if (idx == 0)
withDrawSceneId = config.SecneId;
idx++;
}
}
}));
}
private int payIndex = 0;
public void CreateWithDrawOrder()
{
string taxNo = "";
string payAccount = "tom@gmail.com";
string accountType = "E";
PaymentTypeCode payCode = PaymentTypeCode.GOPAY;
//GOPAY DANA 收款账号需要为电话号码
if (payIndex == 1 || payIndex == 0)
{
payCode = payIndex == 1 ? PaymentTypeCode.DANA : payCode;
payAccount = "0881234567890";
accountType = "P";
}
if (payIndex == 2)
{
// PIX 需要填写税号
payCode = PaymentTypeCode.PIX;
taxNo = "99999999999";
}
if (payIndex == 3) payCode = PaymentTypeCode.MERCADOPAGO;
TCJPLYRM1xJTSDKManager.Instance.CreateWithDrawOrder(withDrawSceneId, payCode, payAccount, accountType, "testName", taxNo, b =>
{
Debug.Log($"CreateWithDrawOrder result : {b}");
});
payIndex++;
payIndex = payIndex > 3 ? 0 : payIndex;
}
public void GetWithDrawOrders()
{
TCJPLYRM1xJTSDKManager.Instance.GetWithDrawOrders(((b, s) =>
{
Debug.Log($"GetWithDrawOrders result : {b}, data : {s}");
if (b)
{
var cfgs = JsonConvert.DeserializeObject<List<WithDrawOrder>>(s);
int idx = 0;
foreach (WithDrawOrder config in cfgs)
{
Debug.Log($"index = {idx}, {config.ToString()}");
idx++;
}
}
}));
}
// Start is called before the first frame update
void Start()
{
Init();
Invoke("ShowSplash", 5);
}
// Update is called once per frame
void Update()
{
}
private void Init()
{
TCJPLYRM1xJTSDKManager.Instance.RegistIosParam((i =>
{
Debug.Log($"ios ab param : {i}");
}));
void GameConfig(bool result, string config)
{
Debug.Log($"************* game config result : {result}, config : {config}");
}
TCJPLYRM1xJTSDKManager.Instance.Init(null, "app_config", GameConfig);
}
public static string GetSdkVersion()
{
return TCJPLYRM1xJTSDKManager.SdkVersion;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 959ec24a7131c9d488e5007fa82612be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 730a988606a036b4b92d1abb57c9d112
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,653 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using TCJPLYRM1xJTSDK;
using UnityEditor;
using UnityEngine;
public class TCJPLYRM1xJTSDKConfigEditor : EditorWindow
{
private static TCJPLYRM1xJTSDKConfigEditor _view;
private int _emptyKwInterIdCount = 1;
private int _emptyKwVideoIdCount = 1;
private int _emptyBigoInterIdCount = 1;
private int _emptyBigoVideoIdCount = 1;
[MenuItem("Tools/设置 &G")]
public static void ShowWin()
{
if (_view != null)
{
CloseView();
return;
}
var win = GetWindow<TCJPLYRM1xJTSDKConfigEditor>();
win.minSize = new Vector2(790, 872);
_view = win;
RemoveExtraEmptyStrings(SDKConfig.KwaiInterUnitId, _view._emptyKwInterIdCount);
RemoveExtraEmptyStrings(SDKConfig.KwaiVideoUnitId, _view._emptyKwVideoIdCount);
RemoveExtraEmptyStrings(SDKConfig.BigoInterUnitId, _view._emptyBigoInterIdCount);
RemoveExtraEmptyStrings(SDKConfig.BigoVideoUnitId, _view._emptyBigoVideoIdCount);
win.Show();
#region topon
_view.loadPluginData();
#endregion
}
static void CloseView()
{
_view.Close();
_view = null;
}
private void OnGUI()
{
DrawWindow();
EditorUtility.SetDirty(SDKConfig.Instance);
}
#region Topon
private AnyThink.Scripts.IntegrationManager.Editor.ATEditorCoroutine loadDataCoroutine;
private AnyThink.Scripts.IntegrationManager.Editor.PluginData pluginData;
private bool pluginDataLoadFailed;
private void loadPluginData()
{
if (loadDataCoroutine != null)
{
loadDataCoroutine.Stop();
}
loadDataCoroutine = AnyThink.Scripts.IntegrationManager.Editor.ATEditorCoroutine.startCoroutine(AnyThink.Scripts.IntegrationManager.Editor.ATIntegrationManager.Instance.loadPluginData(data =>
{
if (data == null)
{
pluginDataLoadFailed = true;
}
else
{
ATLog.log("loadNetworksData() >>> pluginData: " + data);
pluginData = data;
pluginDataLoadFailed = false;
}
}));
}
#endregion
private void DrawWindow()
{
TextLabel("基础配置");
EditorGUILayout.BeginVertical("frameBox");
#if UNITY_IOS
SDKConfig.Instance.appsFlyerDevKey = DrawTextField("appsFlyerDevKey", SDKConfig.Instance.appsFlyerDevKey);
SDKConfig.Instance.appsFlyerIosAppleAppId = DrawTextField("appsFlyerIosAppleAppId", SDKConfig.Instance.appsFlyerIosAppleAppId);
#elif UNITY_ANDROID
SDKConfig.Instance.appsFlyerDevKey = DrawTextField("appsFlyerDevKey", SDKConfig.Instance.appsFlyerDevKey);
#endif
SDKConfig.Instance.logReportUrl = DrawTextField("配置域名", SDKConfig.Instance.logReportUrl);
SDKConfig.Instance.appKey = DrawTextField("appKey", SDKConfig.Instance.appKey);
SDKConfig.Instance.appSecret = DrawTextField("appSecret", SDKConfig.Instance.appSecret);
EditorGUILayout.EndVertical();
TextLabel("广告配置");
#region MAX
// EditorGUILayout.BeginVertical("frameBox");
// TextLabel("MAX", Color.cyan);
// SDKConfig.Instance.maxAppKey = DrawTextField("MaxSdkKey", SDKConfig.Instance.maxAppKey);
// SDKConfig.Instance.videoUnitId = DrawTextField("激励视频 ID", SDKConfig.Instance.videoUnitId);
// SDKConfig.Instance.interUnitId = DrawTextField("插屏 ID", SDKConfig.Instance.interUnitId);
// SDKConfig.Instance.bannerUnitId = DrawTextField("Banner ID", SDKConfig.Instance.bannerUnitId);
// SDKConfig.Instance.splashUnitId = DrawTextField("开屏 ID", SDKConfig.Instance.splashUnitId);
// EditorGUILayout.EndVertical();
// AppLovinSettings.Instance.SdkKey = SDKConfig.Instance.maxAppKey;
#endregion
#region Topon
EditorGUILayout.BeginVertical("frameBox");
TextLabel("Topon", Color.cyan);
SDKConfig.Instance.toponAppId = DrawTextField("AppId", SDKConfig.Instance.toponAppId);
SDKConfig.Instance.toponAppkey = DrawTextField("Appkey", SDKConfig.Instance.toponAppkey);
SDKConfig.Instance.toponVideoUnitId = DrawTextField("激励视频 ID", SDKConfig.Instance.toponVideoUnitId);
SDKConfig.Instance.toponInterUnitId = DrawTextField("插屏 ID", SDKConfig.Instance.toponInterUnitId);
EditorGUILayout.EndVertical();
//AnyThink.Scripts.IntegrationManager.Editor.ATIntegrationManager.Instance.setAdmobAppidByOs(pluginData, );
var integrationManager = AnyThink.Scripts.IntegrationManager.Editor.ATIntegrationManager.Instance;
bool isAdmobInstalledForAndroid = integrationManager.isAdmobInstalled(AnyThink.Scripts.IntegrationManager.Editor.ATConfig.OS_ANDROID);
bool isAdmobInstalledForIos = integrationManager.isAdmobInstalled(AnyThink.Scripts.IntegrationManager.Editor.ATConfig.OS_IOS);
if (isAdmobInstalledForAndroid || isAdmobInstalledForIos)
{
if (isAdmobInstalledForAndroid)
{
var androidAdmobAppId = "ca-app-pub-3940256099942544~3347511713";
integrationManager.setAdmobAppidByOs(pluginData, AnyThink.Scripts.IntegrationManager.Editor.ATConfig.OS_ANDROID, androidAdmobAppId);
}
if (isAdmobInstalledForIos)
{
var iosAdmobAppId = "ca-app-pub-3940256099942544~1458002511";
integrationManager.setAdmobAppidByOs(pluginData, AnyThink.Scripts.IntegrationManager.Editor.ATConfig.OS_IOS, iosAdmobAppId);
}
}
#endregion
#if UNITY_ANDROID
EditorGUILayout.BeginVertical("frameBox");
EditorGUILayout.BeginHorizontal("frameBox");
TextLabel("KWai", Color.cyan);
DrawButton("插屏ID +", AddInterId);
//DrawButton("插屏ID -", DelInterId);
DrawButton("激励视频ID +", AddRewardId);
//DrawButton("激励视频ID -", DelRewardId);
EditorGUILayout.EndHorizontal();
SDKConfig.Instance.kwaiAppId = DrawTextField("AppId", SDKConfig.Instance.kwaiAppId);
for (int i = 0; i < SDKConfig.Instance.kwaiInterUnitId.Count; i++)
{
var index = i;
GUILayout.BeginHorizontal();
SDKConfig.Instance.kwaiInterUnitId[i] =
DrawTextField("插屏ID - " + (i + 1), SDKConfig.Instance.kwaiInterUnitId[i]);
DrawButtonX("X", () => DelInterId(index));
GUILayout.EndHorizontal();
}
for (int i = 0; i < SDKConfig.Instance.kwaiVideoUnitId.Count; i++)
{
var index = i;
GUILayout.BeginHorizontal();
SDKConfig.Instance.kwaiVideoUnitId[i] =
DrawTextField("激励视频ID - " + (i + 1), SDKConfig.Instance.kwaiVideoUnitId[i]);
DrawButtonX("X", () => DelRewardId(index));
GUILayout.EndHorizontal();
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical("frameBox");
EditorGUILayout.BeginHorizontal("frameBox");
TextLabel("Bigo", Color.cyan);
DrawButton("插屏ID +", AddBigoInterId);
DrawButton("激励视频ID +", AddBigoRewardId);
EditorGUILayout.EndHorizontal();
SDKConfig.Instance.bigoAppId = DrawTextField("AppId", SDKConfig.Instance.bigoAppId);
SDKConfig.Instance.bigoSplashUnitId = DrawTextField("开屏 ID", SDKConfig.Instance.bigoSplashUnitId);
for (int i = 0; i < SDKConfig.Instance.bigoInterUnitId.Count; i++)
{
//SDKConfig.Instance.bigoInterUnitId = DrawTextField("插屏 ID", SDKConfig.Instance.bigoInterUnitId);
var index = i;
GUILayout.BeginHorizontal();
SDKConfig.Instance.bigoInterUnitId[i] =
DrawTextField("插屏ID - " + (i + 1), SDKConfig.Instance.bigoInterUnitId[i]);
DrawButtonX("X", () => DelBigoInterId(index));
GUILayout.EndHorizontal();
}
for (int i = 0; i < SDKConfig.Instance.bigoVideoUnitId.Count; i++)
{
//SDKConfig.Instance.bigoVideoUnitId = DrawTextField("激励视频 ID", SDKConfig.Instance.bigoVideoUnitId);
var index = i;
GUILayout.BeginHorizontal();
SDKConfig.Instance.bigoVideoUnitId[i] =
DrawTextField("激励视频ID - " + (i + 1), SDKConfig.Instance.bigoVideoUnitId[i]);
DrawButtonX("X", () => DelBigoRewardId(index));
GUILayout.EndHorizontal();
}
EditorGUILayout.EndVertical();
#endif
EditorGUILayout.BeginVertical("frameBox");
SDKConfig.Instance.isUseAdmobSplash = DrawBoolField("启用开屏优化", SDKConfig.Instance.isUseAdmobSplash, "");
if (SDKConfig.Instance.isUseAdmobSplash)
{
EditorGUILayout.BeginVertical("frameBox");
TextLabel("Admob", Color.cyan);
SDKConfig.Instance.admobAppId = DrawTextField("AppId", SDKConfig.Instance.admobAppId);
SDKConfig.Instance.admobSplashUnitId = DrawTextField("开屏 ID", SDKConfig.Instance.admobSplashUnitId);
//SDKConfig.Instance.admobInterUnitId = DrawTextField("插屏 ID", SDKConfig.Instance.admobInterUnitId);
//SDKConfig.Instance.admobVideoUnitId = DrawTextField("激励视频 ID", SDKConfig.Instance.admobVideoUnitId);
EditorGUILayout.EndVertical();
}
else
{
SDKConfig.Instance.admobSplashUnitId = string.Empty;
}
EditorGUILayout.EndVertical();
TextLabel("Debug");
EditorGUILayout.BeginVertical("frameBox");
SDKConfig.Instance.isDebug = DrawBoolField("测试模式", SDKConfig.Instance.isDebug, "正式发布时请勿勾选");
SDKConfig.Instance.isPrintLog = DrawBoolField("日志打印", SDKConfig.Instance.isPrintLog, "正式发布时请勿勾选");
EditorGUILayout.EndVertical();
// 水平布局实现按钮靠右
GUILayout.BeginHorizontal();
GUILayout.FlexibleSpace(); // 左侧填充弹性空间
if (GUILayout.Button(new GUIContent("从剪贴板获取参数", _tooltipText),
GUILayout.Width(120),
GUILayout.Height(30)
))
{
ParseClipboard();
}
GUILayout.EndHorizontal();
var sdkVersion = TCJPLYRM1xJTSDKManager.SdkVersion;
GUI.Label(new Rect(10, position.height - 40, 400, 40), "@version: " + sdkVersion);
EditorPrefs.SetString("sdk_version", sdkVersion);
}
private string DrawTextField(string title, string content)
{
EditorGUILayout.BeginHorizontal();
GUILayout.Label(title, GUILayout.MinWidth(90), GUILayout.ExpandWidth(false));
content = GUILayout.TextField(content);
EditorGUILayout.EndHorizontal();
return content;
}
private bool DrawBoolField(string title, bool content, string warn = "")
{
EditorGUILayout.BeginHorizontal();
GUILayout.Label(title, GUILayout.MinWidth(80), GUILayout.ExpandWidth(false));
content = EditorGUILayout.Toggle(content);
if (content)
{
TextLabelWarn(warn);
}
EditorGUILayout.EndHorizontal();
return content;
}
private void TextLabel(string content, Color color = new Color())
{
if (color.Equals(Color.clear))
{
color = Color.gray;
}
GUIStyle style = new GUIStyle();
style.contentOffset = new Vector2(8, 0);
style.normal.textColor = color;
style.fontSize = 14;
style.padding = new RectOffset(0, 0, 3, 0);
GUILayout.Label(content, style);
}
private void TextLabelWarn(string content)
{
GUIStyle style = new GUIStyle();
style.contentOffset = new Vector2(8, 0);
style.normal.textColor = Color.red;
style.fontSize = 14;
style.padding = new RectOffset(0, 0, 3, 0);
GUILayout.Label(content, style);
}
private void DrawButton(string btnName, Action clickAction)
{
if (GUILayout.Button(btnName, GUILayout.Width(100), GUILayout.Height(30)))
{
clickAction?.Invoke();
}
}
private void DrawButtonX(string btnName, Action clickAction)
{
var originalBackgroundColor = GUI.backgroundColor;
// 设置按钮的背景颜色
GUI.backgroundColor = Color.red;
if (GUILayout.Button(btnName, GUILayout.Width(40), GUILayout.Height(18)))
{
clickAction?.Invoke();
}
GUI.backgroundColor = originalBackgroundColor;
}
private void AddInterId()
{
_emptyKwInterIdCount++;
SDKConfig.KwaiInterUnitId.Add("");
}
private void DelInterId(int index)
{
_emptyKwInterIdCount--;
SDKConfig.KwaiInterUnitId.RemoveAt(index);
}
private void AddRewardId()
{
_emptyKwVideoIdCount++;
SDKConfig.KwaiVideoUnitId.Add("");
}
private void DelRewardId(int index)
{
_emptyKwVideoIdCount--;
SDKConfig.KwaiVideoUnitId.RemoveAt(index);
}
private void AddBigoInterId()
{
_emptyBigoInterIdCount++;
SDKConfig.BigoInterUnitId.Add("");
}
private void DelBigoInterId(int index)
{
_emptyBigoInterIdCount--;
SDKConfig.BigoInterUnitId.RemoveAt(index);
}
private void AddBigoRewardId()
{
_emptyBigoVideoIdCount++;
SDKConfig.BigoVideoUnitId.Add("");
}
private void DelBigoRewardId(int index)
{
_emptyBigoVideoIdCount--;
SDKConfig.BigoVideoUnitId.RemoveAt(index);
}
static void RemoveExtraEmptyStrings(List<string> list, int count)
{
int emptyCount = count;
if (list == null) return;
// 先统计空字符串的数量
for (int i = list.Count - 1; i >= 0; i--)
{
if (string.IsNullOrEmpty(list[i]))
{
emptyCount++;
if (emptyCount > 1)
{
// 若空字符串数量超过 1,移除该元素
list.RemoveAt(i);
}
}
}
}
// ---------------------------- 参数解析 ------------------------------
private string clipboardText = "";
private Dictionary<string, string> parsedParameters = new Dictionary<string, string>();
private readonly string _tooltipText = "需提前在参数列表界面 Ctrl + A 全选,然后再 Ctrl + C 复制";
// 正则表达式模式字典,用于匹配不同类型的广告参数
private static readonly Dictionary<string, string> parameterPatterns = new Dictionary<string, string>
{
// App基本信息
{ "App名称", @"App name\s*([^\n]+)" },
{ "AF Dev key", @"AF Dev key(?:[\s-]*iOS)?\s*([^\n]+)"},
{ "APP KEY", @"a\s*p\s*p\s*k\s*e\s*y\s*([^\n]+)"},
{ "APP Secret", @"a\s*p\s*p\s*s\s*e\s*c\s*r\s*e\s*t\s*([^\n]+)" },
{ "包名", @"(?:正式包名|测试包名|包名)\*?\s+([^\n]+)"},
{ "广告源", @"广告源\s*([^\n]+)" },
{ "开发者邮箱", @"开发者邮箱\s*([^\n]+)" },
{ "谷歌商店链接", @"谷歌商店链接\s*([^\n]+)" },
{ "官网链接", @"官网链接\s*([^\n]+)" },
{ "隐私协议", @"隐私协议\s*([^\n]+)" },
{ "业务上报域名", @"(?:业务上报域名|业务域名)\s*([^\n]+)" },
{ "appkey", @"appkey\s*([^\n]+)" },
{ "appsecret", @"appsecret\s*([^\n]+)" },
{"AF Apple Appid", @"(?i)app\s*id(?:\s+id)*\s*[=:]*\s*([^\n]*)"},
// MAX (兼容多种格式)
{ "MAX 激励视频", @"MAX参数(?:-[^\s]+)?[\s\S]*?(?:激励视频|激励1|激励2|客户端激励|bidding激励广告位ID|激励)\s*[""\r\n]*([^""\s\r\n]+)"},
{ "MAX 插屏", @"MAX参数(?:-[^\s]+)?[\s\S]*?(?:插屏|插屏1|插屏2|客户端插屏|bidding插屏广告位ID)\s*[""\r\n]*([^""\s\r\n]+)" },
{ "MAX SDK Key", @"MAX参数[\s\S]*?SDK key\*?\s*([^\n]+)" },
{ "MAX ad review key", @"MAX参数[\s\S]*?ad review key\*?\s*([^\n]+)" },
// BIGO (兼容多种格式)
{ "BIGO 应用ID", @"BIGO参数[\s\S]*?(?:应用ID|appid)\s*([^\n]+)" },
{ "BIGO 激励", @"BIGO参数[\s\S]*?(?:激励|激励1|激励2|客户端激励|bidding激励广告位ID)\s*([^\n]+)" },
{ "BIGO 插屏", @"BIGO参数[\s\S]*?(?:插屏|插屏1|插屏2|客户端插屏|bidding插屏广告位ID)\s*([^\n]+)" },
// Kwai (兼容多种格式)
{ "Kwai 应用ID", @"kwai参数[\s\S]*?(?:应用ID|appid)\s*([^\n]+)" },
{ "Kwai 激励", @"kwai参数[\s\S]*?(?:激励|激励1|激励2|客户端激励|bidding激励广告位ID)\s*([^\n]+)" },
{ "Kwai 插屏", @"kwai参数[\s\S]*?(?:插屏|插屏1|插屏2|客户端插屏|bidding插屏广告位ID)\s*([^\n]+)" },
// Admob (兼容多种格式)
{ "Admob 应用ID", @"admob参数[\s\S]*?(?:应用ID|App ID)\s*([^\n]+)" },
{ "Admob 激励", @"admob参数[\s\S]*?(?:激励1|激励)\s*([^\n]+)" },
{ "Admob 插屏", @"admob参数[\s\S]*?(?:插屏1|插屏)\s*([^\n]+)" },
{ "Admob txt", @"admob参数[\s\S]*?txt\s*([^\n]+)" },
// Facebook (兼容多种格式)
{ "FB appid", @"fb参数[\s\S]*?appid\s*([^\n]+)" },
{ "FB property_id", @"fb参数[\s\S]*?property_id\s*([^\n]+)" },
{ "FB 激励", @"fb参数[\s\S]*?激励\s*([^\n]+)" },
{ "FB 插屏", @"fb参数[\s\S]*?插屏\s*([^\n]+)" },
{ "FB txt", @"fb参数[\s\S]*?txt\s*([^\n]+)" },
// Topon (兼容多种格式)
// Topon (兼容多种格式)
{ "Topon ID", @"(?i)topon[\s\S]*?ID[\t\s]+([^\r\n]+)" },
{ "Topon KEY", @"(?i)topon[\s\S]*?(?:App Key|KEY)[\t\s]+([^\r\n]+)" },
{ "Topon 激励", @"(?i)topon[\s\S]*?激励[\t\s]+([^\r\n]+)" },
{ "Topon 插屏", @"(?i)topon[\s\S]*?插屏[\t\s]+([^\r\n]+)" }
};
private void ParseClipboard()
{
if (string.IsNullOrEmpty(clipboardText.Trim()))
{
clipboardText = EditorGUIUtility.systemCopyBuffer;
}
parsedParameters.Clear();
foreach (var pattern in parameterPatterns)
{
Match match = Regex.Match(clipboardText, pattern.Value, RegexOptions.IgnoreCase);
if (match.Success)
{
// 处理可能有多个捕获组的情况(如BIGO和Kwai的两种格式)
for (int i = 1; i < match.Groups.Count; i++)
{
if (!string.IsNullOrEmpty(match.Groups[i].Value))
{
parsedParameters[pattern.Key] = match.Groups[i].Value.Trim();
break;
}
}
}
}
UpdateConfig();
EditorUtility.DisplayDialog("解析完成",
$"成功解析 {parsedParameters.Count} 个参数", "确定");
}
private void UpdateConfig()
{
SDKConfig.Instance.bigoVideoUnitId ??= new List<string>();
SDKConfig.Instance.bigoVideoUnitId.Clear();
SDKConfig.Instance.bigoInterUnitId ??= new List<string>();
SDKConfig.Instance.bigoInterUnitId.Clear();
SDKConfig.Instance.kwaiVideoUnitId ??= new List<string>();
SDKConfig.Instance.kwaiVideoUnitId.Clear();
SDKConfig.Instance.kwaiInterUnitId ??= new List<string>();
SDKConfig.Instance.kwaiInterUnitId.Clear();
foreach (KeyValuePair<string, string> pair in parsedParameters)
{
//Debug.Log($"KEY : {pair.Key}, VALUE : {pair.Value}");
if (pair.Key.Contains("包名"))
{
#if UNITY_IOS
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, pair.Value);
#elif UNITY_ANDROID
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, pair.Value);
#endif
Debug.Log($"包名设置 : {pair.Value}");
}
if (pair.Key.Contains("AF Dev key"))
{
Debug.Log($"AF Dev key: {pair.Value}");
SDKConfig.Instance.appsFlyerDevKey = pair.Value;
}
#if UNITY_IOS
if (pair.Key.Contains("AF Apple Appid"))
{
Debug.Log($"AF Apple Appid: {pair.Value}");
SDKConfig.Instance.appsFlyerIosAppleAppId = pair.Value;
}
#endif
if (pair.Key.Contains("APP KEY"))
{
Debug.Log($"BI APP KEY: {pair.Value}");
SDKConfig.Instance.appKey = pair.Value;
}
if (pair.Key.Contains("APP Secret"))
{
Debug.Log($"BI APP Secret: {pair.Value}");
SDKConfig.Instance.appSecret = pair.Value;
}
if (pair.Key.Contains("域名"))
{
Debug.Log($"业务域名: {pair.Value}");
SDKConfig.Instance.logReportUrl = pair.Value;
}
if (pair.Key.Contains("Topon ID"))
{
Debug.Log($"Topon APP ID: {pair.Value}");
SDKConfig.Instance.toponAppId = pair.Value;
}
if (pair.Key.Contains("Topon KEY"))
{
Debug.Log($"Topon APP KEY: {pair.Value}");
SDKConfig.Instance.toponAppkey = pair.Value;
}
if (pair.Key.Contains("Topon 激励"))
{
Debug.Log($"Topon 激励: {pair.Value}");
SDKConfig.Instance.toponVideoUnitId = pair.Value;
}
if (pair.Key.Contains("Topon 插屏"))
{
Debug.Log($"Topon 插屏: {pair.Value}");
SDKConfig.Instance.toponInterUnitId = pair.Value;
}
if (pair.Key.Contains("MAX SDK Key"))
{
Debug.Log($"MAX SDK Key: {pair.Value}");
SDKConfig.Instance.maxAppKey = pair.Value;
}
if (pair.Key.Contains("MAX 激励视频"))
{
Debug.Log($"MAX 激励视频: {pair.Value}");
SDKConfig.Instance.videoUnitId = pair.Value;
}
if (pair.Key.Contains("MAX 插屏"))
{
Debug.Log($"MAX 插屏: {pair.Value}");
SDKConfig.Instance.interUnitId = pair.Value;
}
if (pair.Key.Contains("BIGO 应用ID"))
{
Debug.Log($"BIGO 应用ID: {pair.Value}");
SDKConfig.Instance.bigoAppId = pair.Value;
}
if (pair.Key.Contains("BIGO 激励"))
{
Debug.Log($"BIGO 激励: {pair.Value}");
//SDKConfig.Instance.bigoVideoUnitId = pair.Value;
SDKConfig.Instance.bigoVideoUnitId ??= new List<string>();
SDKConfig.Instance.bigoVideoUnitId.Add(pair.Value);
}
if (pair.Key.Contains("BIGO 插屏"))
{
Debug.Log($"BIGO 插屏: {pair.Value}");
//SDKConfig.Instance.bigoInterUnitId = pair.Value;
SDKConfig.Instance.bigoInterUnitId ??= new List<string>();
SDKConfig.Instance.bigoInterUnitId.Add(pair.Value);
}
if (pair.Key.Contains("Admob 应用ID"))
{
Debug.Log($"Admob 应用ID: {pair.Value}");
//SDKConfig.Instance.admobAppId = pair.Value;
}
if (pair.Key.Contains("Admob 激励"))
{
Debug.Log($"Admob 激励: {pair.Value}");
}
if (pair.Key.Contains("Admob 插屏"))
{
Debug.Log($"Admob 插屏: {pair.Value}");
}
if (pair.Key.Contains("Kwai 应用ID"))
{
Debug.Log($"Kwai 应用ID: {pair.Value}");
SDKConfig.Instance.kwaiAppId = pair.Value;
}
if (pair.Key.Contains("Kwai 激励"))
{
Debug.Log($"Kwai 激励: {pair.Value}");
SDKConfig.Instance.kwaiVideoUnitId ??= new List<string>();
SDKConfig.Instance.kwaiVideoUnitId.Add(pair.Value);
}
if (pair.Key.Contains("Kwai 插屏"))
{
Debug.Log($"Kwai 插屏: {pair.Value}");
SDKConfig.Instance.kwaiInterUnitId ??= new List<string>();
SDKConfig.Instance.kwaiInterUnitId.Add(pair.Value);
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8b85f7165318af4cb1fa04f57525bcd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4df08fba7905adf48876bcfff4f5704f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,17 @@
package com.tool.countrycode;
import android.app.Activity;
import java.util.Locale;
public class AcquireCountryCode {
// 获取国家码
public static String getCountryCode()
{
Locale locale = Locale.getDefault();
return locale.getCountry();
}
public static String getCountryCode3() {
Locale currentLocale = Locale.getDefault();
return currentLocale.getISO3Country();
}
}
@@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 439c7d376883ccb4da22414c75510b24
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 6e3da5c7fe21c1347a563e64e8f305d4
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d95a0f1f59b85b14d95ac7fa16356627
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 7bc122d7ecc60a94581cd8d1fa8a00d1
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: c832b172e79957744ab4c7e68c763c6e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 35a84cea4ac83ae4aa29726155d13fcc
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 62cd95d3cdb46984ab747afbce81d5a0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,12 @@
#import <Foundation/Foundation.h>
extern "C" {
__attribute__((visibility("default")))
const char* _GetDeviceCountryCode() {
@autoreleasepool {
NSLocale *currentLocale = [NSLocale currentLocale];
NSString *countryCode = [currentLocale objectForKey:NSLocaleCountryCode];
return strdup([countryCode UTF8String]); // 使用strdup确保内存安全
}
}
}
@@ -0,0 +1,37 @@
fileFormatVersion: 2
guid: 63f1a672ae2b65f478662e01b0b67d7b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings: {}
- first:
tvOS: tvOS
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 96d3bb1be45827f47a83034c9908c005
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8ea7ef46cf2ade545b68fd32b9c4b8b6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,14 @@
{
"name": "SDKConfig",
"rootNamespace": "",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8b6da46957b38914aa097a61bd86a16d
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,234 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TCJPLYRM1xJTSDK
{
[System.Serializable]
public class SDKConfig : ScriptableObject
{
public string appsFlyerDevKey;
public string appsFlyerIosAppleAppId;
public string appKey;
public string appSecret;
public string logReportUrl;
public string maxAppKey;
public string splashUnitId;
public string bannerUnitId;
public string interUnitId;
public string videoUnitId;
public string kwaiAppId;
public List<string> kwaiVideoUnitId = new();
public List<string> kwaiInterUnitId = new();
public string bigoAppId;
public List<string> bigoVideoUnitId = new();
public List<string> bigoInterUnitId = new();
public string bigoSplashUnitId;
public string toponAppId;
public string toponAppkey;
public string toponVideoUnitId;
public string toponInterUnitId;
public string admobAppId;
public string admobVideoUnitId;
public string admobInterUnitId;
public string admobSplashUnitId;
public bool isDebug = false;
public bool isPrintLog = false;
public bool isUseAdmobSplash = false;
private static SDKConfig _instance;
public static SDKConfig Instance
{
get
{
if (_instance != null) return _instance;
_instance = AssetUtils.GetScriptableObject<SDKConfig>(typeof(SDKConfig).Name, "Assets/Resources", false, false);
return _instance;
}
set
{
_instance = value;
}
}
public static string AppsFlyerDevKey
{
get { return Instance.appsFlyerDevKey; }
}
public static string AppsFlyerIosAppleAppId
{
get { return Instance.appsFlyerIosAppleAppId; }
}
public static string AppKey
{
get { return Instance.appKey; }
}
public static string AppSecret
{
get { return Instance.appSecret; }
}
public static string LogReportUrl
{
get
{
if (!Instance.logReportUrl.StartsWith("http"))
{
return "https://" + Instance.logReportUrl.Replace(" ", ""); ;
}
return Instance.logReportUrl.Replace(" ", ""); ;
}
}
public static string MaxAppKey
{
get { return Instance.maxAppKey; }
}
public static string SplashUnitID
{
get { return Instance.splashUnitId; }
}
public static string BannerUnitId
{
get { return Instance.bannerUnitId; }
}
public static string InterUnitId
{
get { return Instance.interUnitId; }
}
public static string VideoUnitId
{
get { return Instance.videoUnitId; }
}
public static string KwaiAppId
{
get => Instance.kwaiAppId;
set => Instance.kwaiAppId = value;
}
public static List<string> KwaiVideoUnitId
{
get => Instance.kwaiVideoUnitId;
set => Instance.kwaiVideoUnitId = value;
}
public static List<string> KwaiInterUnitId
{
get => Instance.kwaiInterUnitId;
set => Instance.kwaiInterUnitId = value;
}
public static string BigoAppId
{
get => Instance.bigoAppId;
set => Instance.bigoAppId = value;
}
public static List<string> BigoVideoUnitId
{
get => Instance.bigoVideoUnitId;
set => Instance.bigoVideoUnitId = value;
}
public static List<string> BigoInterUnitId
{
get => Instance.bigoInterUnitId;
set => Instance.bigoInterUnitId = value;
}
public static string BigoSplashUnitId
{
get => Instance.bigoSplashUnitId;
set => Instance.bigoSplashUnitId = value;
}
public static string ToponAppId
{
get { return Instance.toponAppId; }
}
public static string ToponAppkey
{
get { return Instance.toponAppkey; }
}
public static string ToponVideoUnitId
{
get { return Instance.toponVideoUnitId; }
}
public static string ToponInterUnitId
{
get { return Instance.toponInterUnitId; }
}
public static string AdmobAppId
{
get => Instance.admobAppId;
set => Instance.admobAppId = value;
}
public static string AdmobVideoUnitId
{
get => Instance.admobVideoUnitId;
set => Instance.admobVideoUnitId = value;
}
public static string AdmobSplashUnitId
{
get => Instance.admobSplashUnitId;
set => Instance.admobSplashUnitId = value;
}
public static string AdmobInterUnitId
{
get => Instance.admobInterUnitId;
set => Instance.admobInterUnitId = value;
}
public static bool IsDebug => Instance.isDebug;
public static bool IsPrintLog => Instance.isPrintLog;
public static bool IsUseAdmobSplash => Instance.isUseAdmobSplash;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6e4857e9d117e764490d38ceb6820095
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d0d9293c0ca40cd41ba02042aeb78b89
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,152 @@
using System;
using System.IO;
using UnityEngine;
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEditor;
#endif
namespace TCJPLYRM1xJTSDK
{
public static class AssetUtils
{
/// <summary>
/// Returns a reference to a scriptable object of type T with the given fileName at the relative resourcesPath.
/// <para/> If the asset is not found, one will get created automatically (in the Editor only)
/// </summary>
/// <param name="fileName"></param>
/// <param name="resourcesPath"></param>
/// <param name="saveAssetDatabase"></param>
/// <param name="refreshAssetDatabase"></param>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public static T GetScriptableObject<T>(string fileName,
string resourcesPath,
bool saveAssetDatabase,
bool refreshAssetDatabase)
where T : ScriptableObject
{
if (string.IsNullOrEmpty(resourcesPath)) return null;
if (string.IsNullOrEmpty(fileName)) return null;
// ReSharper disable once SuspiciousTypeConversion.Global
// if (!resourcesPath[resourcesPath.Length - 1].Equals(@"\")) resourcesPath += @"\";
// resourcesPath = resourcesPath.Replace(@"\", "/");
resourcesPath = CleanPath(resourcesPath);
var obj = (T)Resources.Load(fileName, typeof(T));
if (obj == null)
{
string simpleResourcesPath = resourcesPath.Replace(resourcesPath.Substring(0, resourcesPath.LastIndexOf("Resources", StringComparison.Ordinal)), "");
simpleResourcesPath = simpleResourcesPath.Replace("Resources", "").Remove(0, 1);
obj = (T)Resources.Load(Path.Combine(simpleResourcesPath, fileName), typeof(T));
}
#if UNITY_EDITOR
if (obj != null) return obj;
if (!Directory.Exists("Assets/Resources"))
{
Directory.CreateDirectory("Assets/Resources");
}
obj = CreateAsset<T>(resourcesPath, fileName, ".asset", saveAssetDatabase, refreshAssetDatabase);
#endif
return obj;
}
public static T GetResource<T>(string resourcesPath, string fileName) where T : ScriptableObject
{
if (string.IsNullOrEmpty(resourcesPath)) return null;
if (string.IsNullOrEmpty(fileName)) return null;
resourcesPath = CleanPath(resourcesPath);
// ReSharper disable once SuspiciousTypeConversion.Global
// if (!resourcesPath[resourcesPath.Length - 1].Equals(@"\")) resourcesPath += @"\";
// resourcesPath = resourcesPath.Replace(@"\", "/");
return (T)Resources.Load(resourcesPath + fileName, typeof(T));
}
public static string CleanPath(string path)
{
// ReSharper disable once SuspiciousTypeConversion.Global
if (!path[path.Length - 1].Equals(@"\")) path += @"\";
path = path.Replace(@"\\", @"\");
path = path.Replace(@"\", "/");
return path;
}
#if UNITY_EDITOR
public static T CreateAsset<T>(string relativePath,
string fileName,
string extension = ".asset",
bool saveAssetDatabase = true,
bool refreshAssetDatabase = true)
where T : ScriptableObject
{
if (string.IsNullOrEmpty(relativePath)) return null;
if (string.IsNullOrEmpty(fileName)) return null;
relativePath = CleanPath(relativePath);
// ReSharper disable once SuspiciousTypeConversion.Global
// if (!relativePath[relativePath.Length - 1].Equals(@"\")) relativePath += @"\";
// relativePath = relativePath.Replace(@"\\", @"\");
var asset = ScriptableObject.CreateInstance<T>();
AssetDatabase.CreateAsset(asset, relativePath + fileName + extension);
EditorUtility.SetDirty(asset);
if (saveAssetDatabase) AssetDatabase.SaveAssets();
if (refreshAssetDatabase) AssetDatabase.Refresh();
return asset;
}
public static List<T> GetAssets<T>() where T : ScriptableObject
{
var list = new List<T>();
string[] guids = AssetDatabase.FindAssets("t:" + typeof(T).Name);
foreach (string guid in guids)
{
var asset = AssetDatabase.LoadAssetAtPath<T>(AssetDatabase.GUIDToAssetPath(guid));
if (asset == null) continue;
list.Add(asset);
}
return list;
}
public static void MoveAssetToTrash(string relativePath, string fileName, bool saveAssetDatabase = true,
bool refreshAssetDatabase = true, bool printDebugMessage = true)
{
if (string.IsNullOrEmpty(relativePath)) return;
if (string.IsNullOrEmpty(fileName)) return;
// ReSharper disable once SuspiciousTypeConversion.Global
// if (!relativePath[relativePath.Length - 1].Equals(@"\")) relativePath += @"\";
relativePath = CleanPath(relativePath);
if (!AssetDatabase.MoveAssetToTrash(relativePath + fileName + ".asset")) return;
if (printDebugMessage) Debug.Log("The " + fileName + ".asset file has been moved to trash.");
if (saveAssetDatabase) AssetDatabase.SaveAssets();
if (refreshAssetDatabase) AssetDatabase.Refresh();
}
public static Texture GetTexture(string filePath, string fileName, string fileExtension = ".png")
{
if (string.IsNullOrEmpty(filePath)) return null;
if (string.IsNullOrEmpty(fileName)) return null;
// ReSharper disable once SuspiciousTypeConversion.Global
// if (!filePath[filePath.Length - 1].Equals(@"\")) filePath += @"\";
filePath = CleanPath(filePath);
return AssetDatabase.LoadAssetAtPath<Texture>(filePath + fileName + fileExtension);
}
public static Texture2D GetTexture2D(string filePath, string fileName, string fileExtension = ".png")
{
if (string.IsNullOrEmpty(filePath)) return null;
if (string.IsNullOrEmpty(fileName)) return null;
// ReSharper disable once SuspiciousTypeConversion.Global
// if (!filePath[filePath.Length - 1].Equals(@"\")) filePath += @"\";
filePath = CleanPath(filePath);
return AssetDatabase.LoadAssetAtPath<Texture2D>(filePath + fileName + fileExtension);
}
#endif
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a6cff4f16b2f10d499cfd019dc05cf9f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d0a2dd547ed87a64a8c6e3d3a12a3d91
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7863556d88b814e09ba9cfc75a91d655
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,426 @@
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
using System;
namespace AppsFlyerSDK
{
public interface IAppsFlyerPurchaseRevenueDataSource
{
Dictionary<string, object> PurchaseRevenueAdditionalParametersForProducts(HashSet<object> products, HashSet<object> transactions);
}
public interface IAppsFlyerPurchaseRevenueDataSourceStoreKit2
{
Dictionary<string, object> PurchaseRevenueAdditionalParametersStoreKit2ForProducts(HashSet<object> products, HashSet<object> transactions);
}
public class AppsFlyerPurchaseRevenueBridge : MonoBehaviour
{
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void RegisterUnityPurchaseRevenueParamsCallback(Func<string, string, string> callback);
[DllImport("__Internal")]
private static extern void RegisterUnityPurchaseRevenueParamsCallbackSK2(Func<string, string, string> callback);
#endif
private static IAppsFlyerPurchaseRevenueDataSource _dataSource;
private static IAppsFlyerPurchaseRevenueDataSourceStoreKit2 _dataSourceSK2;
public static void RegisterDataSource(IAppsFlyerPurchaseRevenueDataSource dataSource)
{
_dataSource = dataSource;
#if UNITY_IOS && !UNITY_EDITOR
RegisterUnityPurchaseRevenueParamsCallback(GetAdditionalParameters);
#elif UNITY_ANDROID && !UNITY_EDITOR
using (AndroidJavaClass jc = new AndroidJavaClass("com.appsflyer.unity.PurchaseRevenueBridge"))
{
jc.CallStatic("setUnityBridge", new UnityPurchaseRevenueBridgeProxy());
}
#endif
}
public static void RegisterDataSourceStoreKit2(IAppsFlyerPurchaseRevenueDataSourceStoreKit2 dataSource)
{
#if UNITY_IOS && !UNITY_EDITOR
_dataSourceSK2 = dataSource;
RegisterUnityPurchaseRevenueParamsCallbackSK2(GetAdditionalParametersSK2);
#endif
}
public static Dictionary<string, object> GetAdditionalParametersForAndroid(HashSet<object> products, HashSet<object> transactions)
{
return _dataSource?.PurchaseRevenueAdditionalParametersForProducts(products, transactions)
?? new Dictionary<string, object>();
}
#if UNITY_IOS && !UNITY_EDITOR
[AOT.MonoPInvokeCallback(typeof(Func<string, string, string>))]
public static string GetAdditionalParameters(string productsJson, string transactionsJson)
{
try
{
HashSet<object> products = new HashSet<object>();
HashSet<object> transactions = new HashSet<object>();
if (!string.IsNullOrEmpty(productsJson))
{
var dict = AFMiniJSON.Json.Deserialize(productsJson) as Dictionary<string, object>;
if (dict != null)
{
if (dict.TryGetValue("products", out var productsObj) && productsObj is List<object> productList)
products = new HashSet<object>(productList);
if (dict.TryGetValue("transactions", out var transactionsObj) && transactionsObj is List<object> transactionList)
transactions = new HashSet<object>(transactionList);
}
}
var parameters = _dataSource?.PurchaseRevenueAdditionalParametersForProducts(products, transactions)
?? new Dictionary<string, object>();
return AFMiniJSON.Json.Serialize(parameters);
}
catch (Exception e)
{
Debug.LogError($"[AppsFlyer] Exception in GetAdditionalParameters: {e}");
return "{}";
}
}
#endif
#if UNITY_IOS && !UNITY_EDITOR
[AOT.MonoPInvokeCallback(typeof(Func<string, string, string>))]
public static string GetAdditionalParametersSK2(string productsJson, string transactionsJson)
{
try
{
HashSet<object> products = new HashSet<object>();
HashSet<object> transactions = new HashSet<object>();
if (!string.IsNullOrEmpty(productsJson))
{
var dict = AFMiniJSON.Json.Deserialize(productsJson) as Dictionary<string, object>;
if (dict != null && dict.TryGetValue("products", out var productsObj) && productsObj is List<object> productList)
products = new HashSet<object>(productList);
}
if (!string.IsNullOrEmpty(transactionsJson))
{
var dict = AFMiniJSON.Json.Deserialize(transactionsJson) as Dictionary<string, object>;
if (dict != null && dict.TryGetValue("transactions", out var transactionsObj) && transactionsObj is List<object> transactionList)
transactions = new HashSet<object>(transactionList);
}
var parameters = _dataSourceSK2?.PurchaseRevenueAdditionalParametersStoreKit2ForProducts(products, transactions)
?? new Dictionary<string, object>();
return AFMiniJSON.Json.Serialize(parameters);
}
catch (Exception e)
{
Debug.LogError($"[AppsFlyer] Exception in GetAdditionalParametersSK2: {e}");
return "{}";
}
}
#endif
}
public class UnityPurchaseRevenueBridgeProxy : AndroidJavaProxy
{
public UnityPurchaseRevenueBridgeProxy() : base("com.appsflyer.unity.PurchaseRevenueBridge$UnityPurchaseRevenueBridge") { }
public string getAdditionalParameters(string productsJson, string transactionsJson)
{
try
{
// Create empty sets if JSON is null or empty
HashSet<object> products = new HashSet<object>();
HashSet<object> transactions = new HashSet<object>();
// Only try to parse if we have valid JSON
if (!string.IsNullOrEmpty(productsJson))
{
try
{
// First try to parse as a simple array
var parsedProducts = AFMiniJSON.Json.Deserialize(productsJson);
if (parsedProducts is List<object> productList)
{
products = new HashSet<object>(productList);
}
else if (parsedProducts is Dictionary<string, object> dict)
{
if (dict.ContainsKey("events") && dict["events"] is List<object> eventsList)
{
products = new HashSet<object>(eventsList);
}
else
{
// If it's a dictionary but doesn't have events, add the whole dict
products.Add(dict);
}
}
}
catch (Exception e)
{
Debug.LogError($"Error parsing products JSON: {e.Message}\nJSON: {productsJson}");
}
}
if (!string.IsNullOrEmpty(transactionsJson))
{
try
{
// First try to parse as a simple array
var parsedTransactions = AFMiniJSON.Json.Deserialize(transactionsJson);
if (parsedTransactions is List<object> transactionList)
{
transactions = new HashSet<object>(transactionList);
}
else if (parsedTransactions is Dictionary<string, object> dict)
{
if (dict.ContainsKey("events") && dict["events"] is List<object> eventsList)
{
transactions = new HashSet<object>(eventsList);
}
else
{
// If it's a dictionary but doesn't have events, add the whole dict
transactions.Add(dict);
}
}
}
catch (Exception e)
{
Debug.LogError($"Error parsing transactions JSON: {e.Message}\nJSON: {transactionsJson}");
}
}
var parameters = AppsFlyerPurchaseRevenueBridge.GetAdditionalParametersForAndroid(products, transactions);
return AFMiniJSON.Json.Serialize(parameters);
}
catch (Exception e)
{
Debug.LogError($"Error in getAdditionalParameters: {e.Message}\nProducts JSON: {productsJson}\nTransactions JSON: {transactionsJson}");
return "{}";
}
}
}
public class AppsFlyerPurchaseConnector : MonoBehaviour {
private static AppsFlyerPurchaseConnector instance;
private Dictionary<string, object> pendingParameters;
private Action<Dictionary<string, object>> pendingCallback;
public static AppsFlyerPurchaseConnector Instance
{
get
{
if (instance == null)
{
GameObject go = new GameObject("AppsFlyerPurchaseConnector");
instance = go.AddComponent<AppsFlyerPurchaseConnector>();
DontDestroyOnLoad(go);
}
return instance;
}
}
private void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
}
}
#if UNITY_ANDROID && !UNITY_EDITOR
private static AndroidJavaClass appsFlyerAndroidConnector = new AndroidJavaClass("com.appsflyer.unity.AppsFlyerAndroidWrapper");
#endif
public static void init(MonoBehaviour unityObject, Store s) {
#if UNITY_IOS && !UNITY_EDITOR
_initPurchaseConnector(unityObject.name);
#elif UNITY_ANDROID && !UNITY_EDITOR
int store = mapStoreToInt(s);
appsFlyerAndroidConnector.CallStatic("initPurchaseConnector", unityObject ? unityObject.name : null, store);
#endif
}
public static void build() {
#if UNITY_IOS && !UNITY_EDITOR
//not for iOS
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("build");
#else
#endif
}
public static void startObservingTransactions() {
#if UNITY_IOS && !UNITY_EDITOR
_startObservingTransactions();
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("startObservingTransactions");
#else
#endif
}
public static void stopObservingTransactions() {
#if UNITY_IOS && !UNITY_EDITOR
_stopObservingTransactions();
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("stopObservingTransactions");
#else
#endif
}
public static void setIsSandbox(bool isSandbox) {
#if UNITY_IOS && !UNITY_EDITOR
_setIsSandbox(isSandbox);
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("setIsSandbox", isSandbox);
#else
#endif
}
public static void setPurchaseRevenueValidationListeners(bool enableCallbacks) {
#if UNITY_IOS && !UNITY_EDITOR
_setPurchaseRevenueDelegate();
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("setPurchaseRevenueValidationListeners", enableCallbacks);
#else
#endif
}
public static void setAutoLogPurchaseRevenue(params AppsFlyerAutoLogPurchaseRevenueOptions[] autoLogPurchaseRevenueOptions) {
#if UNITY_IOS && !UNITY_EDITOR
int option = 0;
foreach (AppsFlyerAutoLogPurchaseRevenueOptions op in autoLogPurchaseRevenueOptions) {
option = option | (int)op;
}
_setAutoLogPurchaseRevenue(option);
#elif UNITY_ANDROID && !UNITY_EDITOR
if (autoLogPurchaseRevenueOptions.Length == 0) {
return;
}
foreach (AppsFlyerAutoLogPurchaseRevenueOptions op in autoLogPurchaseRevenueOptions) {
switch(op) {
case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsDisabled:
break;
case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsAutoRenewableSubscriptions:
appsFlyerAndroidConnector.CallStatic("setAutoLogSubscriptions", true);
break;
case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsInAppPurchases:
appsFlyerAndroidConnector.CallStatic("setAutoLogInApps", true);
break;
default:
break;
}
}
#else
#endif
}
public static void setPurchaseRevenueDataSource(IAppsFlyerPurchaseRevenueDataSource dataSource)
{
#if UNITY_IOS && !UNITY_EDITOR
if (dataSource != null)
{
_setPurchaseRevenueDataSource(dataSource.GetType().Name);
AppsFlyerPurchaseRevenueBridge.RegisterDataSource(dataSource);
}
#elif UNITY_ANDROID && !UNITY_EDITOR
if (dataSource != null)
{
AppsFlyerPurchaseRevenueBridge.RegisterDataSource(dataSource);
}
#endif
}
public static void setPurchaseRevenueDataSourceStoreKit2(IAppsFlyerPurchaseRevenueDataSourceStoreKit2 dataSourceSK2)
{
#if UNITY_IOS && !UNITY_EDITOR
if (dataSourceSK2 != null)
{
AppsFlyerPurchaseRevenueBridge.RegisterDataSourceStoreKit2(dataSourceSK2);
_setPurchaseRevenueDataSource("AppsFlyerObjectScript_StoreKit2");
}
#endif
}
private static int mapStoreToInt(Store s) {
switch(s) {
case(Store.GOOGLE):
return 0;
default:
return -1;
}
}
public static void setStoreKitVersion(StoreKitVersion storeKitVersion) {
#if UNITY_IOS && !UNITY_EDITOR
_setStoreKitVersion((int)storeKitVersion);
#elif UNITY_ANDROID && !UNITY_EDITOR
// Android doesn't use StoreKit
#else
#endif
}
public static void logConsumableTransaction(string transactionJson) {
#if UNITY_IOS && !UNITY_EDITOR
_logConsumableTransaction(transactionJson);
#elif UNITY_ANDROID && !UNITY_EDITOR
// Android doesn't use StoreKit
#else
#endif
}
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void _startObservingTransactions();
[DllImport("__Internal")]
private static extern void _stopObservingTransactions();
[DllImport("__Internal")]
private static extern void _setIsSandbox(bool isSandbox);
[DllImport("__Internal")]
private static extern void _setPurchaseRevenueDelegate();
[DllImport("__Internal")]
private static extern void _setPurchaseRevenueDataSource(string dataSourceName);
[DllImport("__Internal")]
private static extern void _setAutoLogPurchaseRevenue(int option);
[DllImport("__Internal")]
private static extern void _initPurchaseConnector(string objectName);
[DllImport("__Internal")]
private static extern void _setStoreKitVersion(int storeKitVersion);
[DllImport("__Internal")]
private static extern void _logConsumableTransaction(string transactionJson);
#endif
}
public enum Store {
GOOGLE = 0
}
public enum AppsFlyerAutoLogPurchaseRevenueOptions
{
AppsFlyerAutoLogPurchaseRevenueOptionsDisabled = 0,
AppsFlyerAutoLogPurchaseRevenueOptionsAutoRenewableSubscriptions = 1 << 0,
AppsFlyerAutoLogPurchaseRevenueOptionsInAppPurchases = 1 << 1
}
public enum StoreKitVersion {
SK1 = 0,
SK2 = 1
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0636ea07d370d437183f3762280c08ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
namespace AppsFlyerSDK
{
public interface IAppsFlyerPurchaseValidation
{
void didReceivePurchaseRevenueValidationInfo(string validationInfo);
void didReceivePurchaseRevenueError(string error);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7c60f499ae0d048b1be8ffd6878a184c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 96a328019e42349aabc478b546b8605e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 682114f7790724ab3b9410e89bbc076c
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20G417</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>AppsFlyerBundle</string>
<key>CFBundleIdentifier</key>
<string>com.appsflyer.support.two.AppsFlyerBundle</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AppsFlyerBundle</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>13A1030d</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>12.0</string>
<key>DTSDKBuild</key>
<string>21A344</string>
<key>DTSDKName</key>
<string>macosx12.0</string>
<key>DTXcode</key>
<string>1310</string>
<key>DTXcodeBuild</key>
<string>13A1030d</string>
<key>LSMinimumSystemVersion</key>
<string>11.6</string>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict/>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
@@ -0,0 +1,184 @@
#nullable enable
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
[System.Serializable]
public class InAppPurchaseValidationResult : EventArgs
{
public bool success;
public ProductPurchase? productPurchase;
public ValidationFailureData? failureData;
public string? token;
}
[System.Serializable]
public class ProductPurchase
{
public string? kind;
public string? purchaseTimeMillis;
public int purchaseState;
public int consumptionState;
public string? developerPayload;
public string? orderId;
public int purchaseType;
public int acknowledgementState;
public string? purchaseToken;
public string? productId;
public int quantity;
public string? obfuscatedExternalAccountId;
public string? obfuscatedExternalProfil;
public string? regionCode;
}
[System.Serializable]
public class ValidationFailureData
{
public int status;
public string? description;
}
[System.Serializable]
public class SubscriptionValidationResult
{
public bool success;
public SubscriptionPurchase? subscriptionPurchase;
public ValidationFailureData? failureData;
public string? token;
}
[System.Serializable]
public class SubscriptionPurchase
{
public string? acknowledgementState;
public CanceledStateContext? canceledStateContext;
public ExternalAccountIdentifiers? externalAccountIdentifiers;
public string? kind;
public string? latestOrderId;
public List<SubscriptionPurchaseLineItem>? lineItems;
public string? linkedPurchaseToken;
public PausedStateContext? pausedStateContext;
public string? regionCode;
public string? startTime;
public SubscribeWithGoogleInfo? subscribeWithGoogleInfo;
public string? subscriptionState;
public TestPurchase? testPurchase;
}
[System.Serializable]
public class CanceledStateContext
{
public DeveloperInitiatedCancellation? developerInitiatedCancellation;
public ReplacementCancellation? replacementCancellation;
public SystemInitiatedCancellation? systemInitiatedCancellation;
public UserInitiatedCancellation? userInitiatedCancellation;
}
[System.Serializable]
public class ExternalAccountIdentifiers
{
public string? externalAccountId;
public string? obfuscatedExternalAccountId;
public string? obfuscatedExternalProfileId;
}
[System.Serializable]
public class SubscriptionPurchaseLineItem
{
public AutoRenewingPlan? autoRenewingPlan;
public DeferredItemReplacement? deferredItemReplacement;
public string? expiryTime;
public OfferDetails? offerDetails;
public PrepaidPlan? prepaidPlan;
public string? productId;
}
[System.Serializable]
public class PausedStateContext
{
public string? autoResumeTime;
}
[System.Serializable]
public class SubscribeWithGoogleInfo
{
public string? emailAddress;
public string? familyName;
public string? givenName;
public string? profileId;
public string? profileName;
}
[System.Serializable]
public class TestPurchase{}
[System.Serializable]
public class DeveloperInitiatedCancellation{}
[System.Serializable]
public class ReplacementCancellation{}
[System.Serializable]
public class SystemInitiatedCancellation{}
[System.Serializable]
public class UserInitiatedCancellation
{
public CancelSurveyResult? cancelSurveyResult;
public string? cancelTime;
}
[System.Serializable]
public class AutoRenewingPlan
{
public string? autoRenewEnabled;
public SubscriptionItemPriceChangeDetails? priceChangeDetails;
}
[System.Serializable]
public class DeferredItemReplacement
{
public string? productId;
}
[System.Serializable]
public class OfferDetails
{
public List<string>? offerTags;
public string? basePlanId;
public string? offerId;
}
[System.Serializable]
public class PrepaidPlan
{
public string? allowExtendAfterTime;
}
[System.Serializable]
public class CancelSurveyResult
{
public string? reason;
public string? reasonUserInput;
}
[System.Serializable]
public class SubscriptionItemPriceChangeDetails
{
public string? expectedNewPriceChargeTime;
public Money? newPrice;
public string? priceChangeMode;
public string? priceChangeState;
}
[System.Serializable]
public class Money
{
public string? currencyCode;
public long nanos;
public long units;
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9a1435104a69d4c8ebcc6f237cc29a54
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1f19f272c71674582bed1d93925da003
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 7b5b4579db85b4cfd8395bfb19aa309e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 642cf65ed2573419bab7e7d44fc73181
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 3a5ccbd864ba94a9a9ba47895ff14922
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: ee45ae2608f3c44d08fc6e21a94d133f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,24 @@
{
"name": "Tests",
"references": [
"UnityEngine.TestRunner",
"UnityEditor.TestRunner",
"AppsFlyer"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll",
"NSubstitute.dll",
"Castle.Core.dll",
"System.Threading.Tasks.Extensions.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [],
"noEngineReferences": false
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1f155a0e4c9ab48eeb4b54b2dc0aeba7
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,810 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using NSubstitute;
namespace AppsFlyerSDK.Tests
{
public class NewTestScript
{
[Test]
public void test_startSDK_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.startSDK();
AppsFlyerMOCKInterface.Received().startSDK(Arg.Any<bool>(), Arg.Any<string>());
}
[Test]
public void test_sendEvent_withValues()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
var eventParams = new Dictionary<string, string>();
eventParams.Add("key", "value");
AppsFlyer.sendEvent("testevent", eventParams);
AppsFlyerMOCKInterface.Received().sendEvent("testevent", eventParams, false, null);
}
[Test]
public void test_sendEvent_withNullParams()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.sendEvent("testevent", null);
AppsFlyerMOCKInterface.Received().sendEvent("testevent", null,false, null);
}
[Test]
public void test_isSDKStopped_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.stopSDK(true);
AppsFlyerMOCKInterface.Received().stopSDK(true);
}
[Test]
public void test_isSDKStopped_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.stopSDK(false);
AppsFlyerMOCKInterface.Received().stopSDK(false);
}
[Test]
public void test_isSDKStopped_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
var isSDKStopped = AppsFlyer.isSDKStopped();
AppsFlyerMOCKInterface.Received().isSDKStopped();
}
[Test]
public void test_isSDKStopped_receveivedFalse()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
var isSDKStopped = AppsFlyer.isSDKStopped();
Assert.AreEqual(AppsFlyerMOCKInterface.Received().isSDKStopped(), false);
}
[Test]
public void test_getSdkVersion_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.getSdkVersion();
AppsFlyerMOCKInterface.Received().getSdkVersion();
}
[Test]
public void test_setCustomerUserId_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCustomerUserId("test");
AppsFlyerMOCKInterface.Received().setCustomerUserId("test");
}
[Test]
public void Test_setAppInviteOneLinkID_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setAppInviteOneLinkID("2f36");
AppsFlyerMOCKInterface.Received().setAppInviteOneLinkID("2f36");
}
[Test]
public void Test_setAdditionalData_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
var customData = new Dictionary<string, string>();
customData.Add("test", "test");
AppsFlyer.setAdditionalData(customData);
AppsFlyerMOCKInterface.Received().setAdditionalData(customData);
}
[Test]
public void Test_setResolveDeepLinkURLs_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setResolveDeepLinkURLs("url1", "url2");
AppsFlyerMOCKInterface.Received().setResolveDeepLinkURLs("url1", "url2");
}
[Test]
public void Test_setOneLinkCustomDomain_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setOneLinkCustomDomain("url1", "url2");
AppsFlyerMOCKInterface.Received().setOneLinkCustomDomain("url1", "url2");
}
[Test]
public void Test_setCurrencyCode_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCurrencyCode("usd");
AppsFlyerMOCKInterface.Received().setCurrencyCode("usd");
}
[Test]
public void Test_recordLocation_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.recordLocation(0.3, 5.2);
AppsFlyerMOCKInterface.Received().recordLocation(0.3, 5.2);
}
[Test]
public void Test_anonymizeUser_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.anonymizeUser(true);
AppsFlyerMOCKInterface.Received().anonymizeUser(true);
}
[Test]
public void Test_anonymizeUser_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.anonymizeUser(false);
AppsFlyerMOCKInterface.Received().anonymizeUser(false);
}
[Test]
public void Test_getAppsFlyerId_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.getAppsFlyerId();
AppsFlyerMOCKInterface.Received().getAppsFlyerId();
}
[Test]
public void Test_setMinTimeBetweenSessions_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setMinTimeBetweenSessions(3);
AppsFlyerMOCKInterface.Received().setMinTimeBetweenSessions(3);
}
[Test]
public void Test_setHost_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setHost("prefix", "name");
AppsFlyerMOCKInterface.Received().setHost("prefix", "name");
}
[Test]
public void Test_setPhoneNumber_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setPhoneNumber("002");
AppsFlyerMOCKInterface.Received().setPhoneNumber("002");
}
[Test]
[System.Obsolete]
public void Test_setSharingFilterForAllPartners_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setSharingFilterForAllPartners();
AppsFlyerMOCKInterface.Received().setSharingFilterForAllPartners();
}
[Test]
[System.Obsolete]
public void Test_setSharingFilter_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setSharingFilter("filter1", "filter2");
AppsFlyerMOCKInterface.Received().setSharingFilter("filter1", "filter2");
}
[Test]
public void Test_getConversionData_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.getConversionData("ObjectName");
AppsFlyerMOCKInterface.Received().getConversionData("ObjectName");
}
[Test]
public void Test_attributeAndOpenStore_called_withParams()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("af_sub1", "val");
parameters.Add("custom_param", "val2");
AppsFlyer.attributeAndOpenStore("appid", "campaign", parameters, new MonoBehaviour());
AppsFlyerMOCKInterface.Received().attributeAndOpenStore("appid", "campaign", parameters, Arg.Any<MonoBehaviour>());
}
[Test]
public void Test_attributeAndOpenStore_called_nullParams()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.attributeAndOpenStore("appid", "campaign", null, new MonoBehaviour());
AppsFlyerMOCKInterface.Received().attributeAndOpenStore("appid", "campaign", null, Arg.Any<MonoBehaviour>());
}
[Test]
public void Test_recordCrossPromoteImpression_calledWithParameters()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("af_sub1", "val");
parameters.Add("custom_param", "val2");
AppsFlyer.recordCrossPromoteImpression("appid", "campaign", parameters);
AppsFlyerMOCKInterface.Received().recordCrossPromoteImpression("appid", "campaign", parameters);
}
[Test]
public void Test_recordCrossPromoteImpression_calledWithoutParameters()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.recordCrossPromoteImpression("appid", "campaign", null);
AppsFlyerMOCKInterface.Received().recordCrossPromoteImpression("appid", "campaign", null);
}
[Test]
public void Test_generateUserInviteLink_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.generateUserInviteLink(new Dictionary<string, string>(), new MonoBehaviour());
AppsFlyerMOCKInterface.Received().generateUserInviteLink(Arg.Any<Dictionary<string, string>>(), Arg.Any<MonoBehaviour>());
}
[Test]
public void Test_addPushNotificationDeepLinkPath_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.addPushNotificationDeepLinkPath("path1", "path2");
AppsFlyerMOCKInterface.Received().addPushNotificationDeepLinkPath("path1", "path2");
}
#if UNITY_ANDROID
[Test]
public void updateServerUninstallToken_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.updateServerUninstallToken("tokenTest");
AppsFlyerMOCKInterface.Received().updateServerUninstallToken("tokenTest");
}
[Test]
public void setImeiData_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setImeiData("imei");
AppsFlyerMOCKInterface.Received().setImeiData("imei");
}
[Test]
public void setAndroidIdData_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setAndroidIdData("androidId");
AppsFlyerMOCKInterface.Received().setAndroidIdData("androidId");
}
[Test]
public void waitForCustomerUserId_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.waitForCustomerUserId(true);
AppsFlyerMOCKInterface.Received().waitForCustomerUserId(true);
}
[Test]
public void setCustomerIdAndStartSDK_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCustomerIdAndStartSDK("01234");
AppsFlyerMOCKInterface.Received().setCustomerIdAndStartSDK("01234");
}
[Test]
public void getOutOfStore_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.getOutOfStore();
AppsFlyerMOCKInterface.Received().getOutOfStore();
}
[Test]
public void setOutOfStore_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setOutOfStore("test");
AppsFlyerMOCKInterface.Received().setOutOfStore("test");
}
[Test]
public void setCollectAndroidID_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCollectAndroidID(true);
AppsFlyerMOCKInterface.Received().setCollectAndroidID(true);
}
[Test]
public void setCollectIMEI_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCollectIMEI(true);
AppsFlyerMOCKInterface.Received().setCollectIMEI(true);
}
[Test]
public void setIsUpdate_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setIsUpdate(true);
AppsFlyerMOCKInterface.Received().setIsUpdate(true);
}
[Test]
public void setPreinstallAttribution_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setPreinstallAttribution("mediaSourceTestt", "campaign", "sideId");
AppsFlyerMOCKInterface.Received().setPreinstallAttribution("mediaSourceTestt", "campaign", "sideId");
}
[Test]
public void isPreInstalledApp_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.isPreInstalledApp();
AppsFlyerMOCKInterface.Received().isPreInstalledApp();
}
[Test]
public void getAttributionId_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.getAttributionId();
AppsFlyerMOCKInterface.Received().getAttributionId();
}
[Test]
public void handlePushNotifications_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.handlePushNotifications();
AppsFlyerMOCKInterface.Received().handlePushNotifications();
}
[Test]
public void validateAndSendInAppPurchase_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.validateAndSendInAppPurchase("ewjkekwjekw","hewjehwj", "purchaseData", "3.0", "USD", null, null);
AppsFlyerMOCKInterface.Received().validateAndSendInAppPurchase("ewjkekwjekw", "hewjehwj", "purchaseData", "3.0", "USD", null, null);
}
[Test]
public void setCollectOaid_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCollectOaid(true);
AppsFlyerMOCKInterface.Received().setCollectOaid(true);
}
[Test]
public void setDisableAdvertisingIdentifiers_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setDisableAdvertisingIdentifiers(true);
AppsFlyerMOCKInterface.Received().setDisableAdvertisingIdentifiers(true);
}
[Test]
public void setDisableNetworkData_called() {
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setDisableNetworkData(true);
AppsFlyerMOCKInterface.Received().setDisableNetworkData(true);
}
#elif UNITY_IOS
[Test]
public void setDisableCollectAppleAdSupport_called_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setDisableCollectAppleAdSupport(true);
AppsFlyerMOCKInterface.Received().setDisableCollectAppleAdSupport(true);
}
[Test]
public void setDisableCollectAppleAdSupport_called_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setDisableCollectAppleAdSupport(false);
AppsFlyerMOCKInterface.Received().setDisableCollectAppleAdSupport(false);
}
[Test]
[System.Obsolete]
public void setShouldCollectDeviceName_called_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setShouldCollectDeviceName(true);
AppsFlyerMOCKInterface.Received().setShouldCollectDeviceName(true);
}
[Test]
[System.Obsolete]
public void setShouldCollectDeviceName_called_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setShouldCollectDeviceName(false);
AppsFlyerMOCKInterface.Received().setShouldCollectDeviceName(false);
}
[Test]
public void setDisableCollectIAd_called_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setDisableCollectIAd(true);
AppsFlyerMOCKInterface.Received().setDisableCollectIAd(true);
}
[Test]
public void setDisableCollectIAd_called_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setDisableCollectIAd(false);
AppsFlyerMOCKInterface.Received().setDisableCollectIAd(false);
}
[Test]
public void setUseReceiptValidationSandbox_called_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setUseReceiptValidationSandbox(true);
AppsFlyerMOCKInterface.Received().setUseReceiptValidationSandbox(true);
}
[Test]
public void setUseReceiptValidationSandbox_called_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setUseReceiptValidationSandbox(false);
AppsFlyerMOCKInterface.Received().setUseReceiptValidationSandbox(false);
}
[Test]
public void ssetUseUninstallSandbox_called_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setUseUninstallSandbox(true);
AppsFlyerMOCKInterface.Received().setUseUninstallSandbox(true);
}
[Test]
public void setUseUninstallSandbox_called_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setUseUninstallSandbox(false);
AppsFlyerMOCKInterface.Received().setUseUninstallSandbox(false);
}
[Test]
public void validateAndSendInAppPurchase_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.validateAndSendInAppPurchase("3d2", "5.0","USD", "45", null, null);
AppsFlyerMOCKInterface.Received().validateAndSendInAppPurchase("3d2", "5.0", "USD", "45", null, null);
}
[Test]
public void registerUninstall_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
byte[] token = System.Text.Encoding.UTF8.GetBytes("740f4707 bebcf74f 9b7c25d4 8e335894 5f6aa01d a5ddb387 462c7eaf 61bb78ad");
AppsFlyer.registerUninstall(token);
AppsFlyerMOCKInterface.Received().registerUninstall(token);
}
[Test]
public void handleOpenUrl_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.handleOpenUrl("www.test.com", "appTest", "test");
AppsFlyerMOCKInterface.Received().handleOpenUrl("www.test.com", "appTest", "test");
}
[Test]
public void waitForATTUserAuthorizationWithTimeoutInterval_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(30);
AppsFlyerMOCKInterface.Received().waitForATTUserAuthorizationWithTimeoutInterval(30);
}
[Test]
public void setCurrentDeviceLanguage_called()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.setCurrentDeviceLanguage("en");
AppsFlyerMOCKInterface.Received().setCurrentDeviceLanguage("en");
}
[Test]
public void disableSKAdNetwork_called_true()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.disableSKAdNetwork(true);
AppsFlyerMOCKInterface.Received().disableSKAdNetwork(true);
}
[Test]
public void disableSKAdNetwork_called_false()
{
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
AppsFlyer.instance = AppsFlyerMOCKInterface;
AppsFlyer.disableSKAdNetwork(false);
AppsFlyerMOCKInterface.Received().disableSKAdNetwork(false);
}
#endif
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1b1a24aa01166451d804d7c03c14a3db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 429c3c4b79918684894c368157dad34a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bd0ef81b1482347b38905fab4f30e583
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,3 @@
{
"name": "BigoAds"
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a16a603f2fee3094a83a14116e2d8129
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 467aa0b9eadf04b22b5b3713a1b07bea
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1dd438e36fdc745aaa018eac5d3b182c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,115 @@
using System;
using System.Collections.Generic;
using BigoAds.Scripts.Api.Constant;
using System.Collections.Generic;
namespace BigoAds.Scripts.Api
{
public class BigoAdConfig
{
public const string EXTRA_KEY_HOST_RULES = "host_rules";
/// <summary>
/// the unique identifier of the App
/// </summary>
internal string AppId { get; }
/// <summary>
/// Custom set the debugLog to print debug Log.
/// debugLog NO: close debug log, YES: open debug log.
/// </summary>
internal bool DebugLog { get; }
/// <summary>
/// Channels for publishing media applications
/// </summary>
internal string Channel { get; }
internal int Age { get; }
internal int Gender { get; }
internal long ActivatedTime { get; }
internal Dictionary<string, string> ExtraDictionary { get; }
private BigoAdConfig(BigoAdConfig.Builder builder)
{
AppId = builder.AppId;
DebugLog = builder.DebugLog;
Channel = builder.Channel;
Age = builder.Age;
Gender = (int)builder.Gender;
ActivatedTime = builder.ActivatedTime;
ExtraDictionary = builder.ExtraDictionary;
}
public class Builder
{
internal string AppId;
internal bool DebugLog;
internal string Channel;
internal int Age;
internal BGAdGender Gender;
internal long ActivatedTime;
internal Dictionary<string, string> ExtraDictionary = new Dictionary<string, string>();
public Builder SetAppId(string appid)
{
this.AppId = appid;
return this;
}
public Builder SetDebugLog(bool debugLog)
{
this.DebugLog = debugLog;
return this;
}
public Builder SetChannel(string channel)
{
this.Channel = channel;
return this;
}
public Builder SetAge(int age)
{
this.Age = age;
return this;
}
public Builder SetGender(BGAdGender gender)
{
this.Gender = gender;
return this;
}
public Builder SetActivatedTime(long activatedTime)
{
this.ActivatedTime = activatedTime;
return this;
}
///Only works on Android
public Builder SetExtra(string key, string extra)
{
if (key != null && extra != null)
{
this.ExtraDictionary.Add(key, extra);
}
return this;
}
public BigoAdConfig Build()
{
return new BigoAdConfig(this);
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b18497a84c58a49f385b63be54aff0cb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,106 @@
using BigoAds.Scripts.Common;
using BigoAds.Scripts.Api.Constant;
namespace BigoAds.Scripts.Api
{
public static class BigoAdSdk
{
private static IClientFactory _clientFactory;
private static ISDK _sdk;
internal static ISDK SDK
{
get
{
if (_sdk == null)
{
_sdk = GetClientFactory().BuildSDKClient();
}
return _sdk;
}
}
internal static IClientFactory GetClientFactory()
{
if (_clientFactory != null)
{
return _clientFactory;
}
_clientFactory =
#if UNITY_ANDROID
new BigoAds.Scripts.Platforms.Android.AndroidClientFactory();
#elif UNITY_IOS
new BigoAds.Scripts.Platforms.iOS.IOSClientFactory();
#else
null;
throw new PlatformNotSupportedException();
#endif
return _clientFactory;
}
public delegate void InitResultDelegate();
public static event InitResultDelegate OnInitFinish;
/// Starts the Bigo SDK
/// @warning Call this method as early as possible to reduce ad request fail.
/// @param config SDK configuration
/// @param callback Callback for starting the Bigo SDK
/// ////
public static void Initialize(BigoAdConfig config)
{
if (IsInitSuccess())
{
OnInitFinish?.Invoke();
return;
}
SDK.Init(config, (() => { OnInitFinish?.Invoke(); }));
}
////
/// The SDK initialization state
////
public static bool IsInitSuccess()
{
return SDK.IsInitSuccess();
}
///////
/// Bigo SDK version
/// ////
public static string GetSDKVersion()
{
return SDK.GetSDKVersion();
}
///////
/// Bigo SDK version name
/// ////
public static string GetSDKVersionName()
{
return SDK.GetSDKVersionName();
}
///////
/// Bigo SDK set user consent
/// ////
public static void SetUserConsent(ConsentOptions option, bool consent)
{
SDK.SetUserConsent(option, consent);
}
///////
/// Only works on Android
/// Bigo SDK set user consent
/// ////
public static void AddExtraHost(string country, string host)
{
SDK.AddExtraHost(country, host);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e5ad9c8c265954d4e8f4f03312b5fa42
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,30 @@
using BigoAds.Scripts.Api.Constant;
using BigoAds.Scripts.Common;
using UnityEngine;
namespace BigoAds.Scripts.Api
{
public class BigoBannerAd : BigoBaseAd<BigoBannerRequest>
{
private readonly IBannerAd _bannerAdClient;
/// <summary>
/// create a banner ad
/// </summary>
/// <param name="slotId"></param>
public BigoBannerAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildBannerAdClient())
{
_bannerAdClient = (IBannerAd) ADClient;
}
/// <summary>
/// set position for banner
/// </summary>
/// <param name="position"></param>
public void SetPosition(BigoPosition position)
{
_bannerAdClient?.SetPosition(position);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5136d466cbb6c461f92fbd90b6fa157d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,22 @@
using System;
using BigoAds.Scripts.Api.Constant;
using UnityEngine;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoBannerRequest : BigoRequest
{
[SerializeField()]
private BigoBannerSize size;
public BigoBannerSize Size => size;
public BigoPosition Position { get; }
public BigoBannerRequest(BigoBannerSize size, BigoPosition position = BigoPosition.Bottom)
{
this.size = size;
this.Position = position;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 159c6164853954739adbca1ae7592df7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,11 @@
using BigoAds.Scripts.Common;
namespace BigoAds.Scripts.Api
{
public class BigoInterstitialAd : BigoBaseAd<BigoInterstitialRequest>
{
public BigoInterstitialAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildInterstitialAdClient())
{
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1323eae1e03094d8281b23f5527a53db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
using System;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoInterstitialRequest : BigoRequest
{
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1947fd630823b4858af6c3a471497f70
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
using BigoAds.Scripts.Api.Constant;
using BigoAds.Scripts.Common;
using UnityEngine;
namespace BigoAds.Scripts.Api
{
public class BigoNativeAd : BigoBaseAd<BigoNativeRequest>
{
private readonly INativeAd _NativeAdClient;
public BigoNativeAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildNativeAdClient())
{
_NativeAdClient = (INativeAd) ADClient;
}
/// <summary>
/// set position for native
/// </summary>
/// <param name="position"></param>
public void SetPosition(BigoPosition position)
{
_NativeAdClient?.SetPosition(position);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1742d1ee2ff5e4d508ae81524cb94ade
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
using System;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoNativeRequest : BigoRequest
{
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 033c30386f5714bddb5dd41d7524979e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,11 @@
using BigoAds.Scripts.Common;
namespace BigoAds.Scripts.Api
{
public class BigoPopupAd : BigoBaseAd<BigoPopupRequest>
{
public BigoPopupAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildPopupAdClient())
{
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2be0a8fe9e5aa4bea8970a47e617a076
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
using System;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoPopupRequest : BigoRequest
{
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 580aad20fbde543bab37a5e878c682cb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,47 @@
using System;
using UnityEngine;
using BigoAds.Scripts.Api.Constant;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoRequest
{
[SerializeField] private string extraInfo;
[SerializeField] private int age;
[SerializeField] private BGAdGender gender;
[SerializeField] private long activatedTime;
public string ExtraInfoJson
{
get => extraInfo;
set => extraInfo = value;
}
/// Only works on Android
public int Age
{
get => age;
set => age = value;
}
/// Only works on Android
public BGAdGender Gender
{
get => gender;
set => gender = value;
}
/// Only works on Android
public long ActivatedTime
{
get => activatedTime;
set => activatedTime = value;
}
public string ToJson()
{
return JsonUtility.ToJson(this);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2707ffe474e6443d6a5260876d5b1370
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,29 @@
using System;
using BigoAds.Scripts.Common;
namespace BigoAds.Scripts.Api
{
public class BigoRewardedAd : BigoBaseAd<BigoRewardedRequest>
{
public event Action OnUserEarnedReward;
public BigoRewardedAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildRewardedAdClient())
{
var rewardedAdClient = (IRewardedAd) ADClient;
rewardedAdClient.OnUserEarnedReward += InvokeOnUserEarnedReward;
}
private void InvokeOnUserEarnedReward()
{
if (CallbackOnMainThread)
{
BigoDispatcher.PostTask((() => { OnUserEarnedReward?.Invoke(); }));
}
else
{
OnUserEarnedReward?.Invoke();
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2f745c8797b25430685a5a08b34f0d9f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
using System;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoRewardedRequest : BigoRequest
{
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 38f4a763a1fc9429ca87c62eed4b4645
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,11 @@
using BigoAds.Scripts.Common;
namespace BigoAds.Scripts.Api
{
public class BigoSplashAd : BigoBaseAd<BigoSplashRequest>
{
public BigoSplashAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildSplashAdClient())
{
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 61b62ca232d2e42788e61f33d7784209
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
using System;
namespace BigoAds.Scripts.Api
{
[Serializable]
public class BigoSplashRequest : BigoRequest
{
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: afdf808922a744419b5db1fdd4ca18b9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0762cd7e46c3c43e5a32b1558643eb74
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
using System;
namespace BigoAds.Scripts.Api.Constant
{
[Serializable]
public enum BGAdGender
{
Female = 1,
Male = 2
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2784802c5b5b34470a0500118ccb7f55
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,13 @@
using System;
namespace BigoAds.Scripts.Api.Constant
{
[Serializable]
public enum BGAdLossReason
{
InternalError = 1,
Timeout = 2,
LowerThanFloorPrice = 100,
LowerThanHighestPrice = 101
}
}

Some files were not shown because too many files have changed in this diff Show More