[U] ad plugins
This commit is contained in:
@@ -42,12 +42,12 @@ dependencies {
|
|||||||
|
|
||||||
// Android Resolver Dependencies Start
|
// Android Resolver Dependencies Start
|
||||||
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:10
|
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:10
|
||||||
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.0]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
|
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
|
||||||
implementation 'com.applovin.mediation:fyber-adapter:8.3.1.1' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
|
implementation 'com.applovin.mediation:fyber-adapter:8.3.5.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
|
||||||
implementation 'com.applovin.mediation:google-adapter:[23.3.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
|
implementation 'com.applovin.mediation:google-adapter:[23.6.0.2]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
|
||||||
implementation 'com.applovin.mediation:ironsource-adapter:8.3.0.0.2' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
|
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
|
||||||
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
|
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
|
||||||
implementation 'com.applovin.mediation:vungle-adapter:7.4.1.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
|
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
|
||||||
implementation 'com.applovin:applovin-sdk:13.0.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
|
implementation 'com.applovin:applovin-sdk:13.0.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
|
||||||
implementation 'com.appsflyer:adrevenue:6.9.1' // Assets/AppsFlyer/Editor/AppsFlyerAdRevenueDependencies.xml:4
|
implementation 'com.appsflyer:adrevenue:6.9.1' // Assets/AppsFlyer/Editor/AppsFlyerAdRevenueDependencies.xml:4
|
||||||
implementation 'com.appsflyer:af-android-sdk:6.14.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:6
|
implementation 'com.appsflyer:af-android-sdk:6.14.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:6
|
||||||
|
|||||||
@@ -185,11 +185,11 @@ Transform:
|
|||||||
m_GameObject: {fileID: 198000829}
|
m_GameObject: {fileID: 198000829}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -20.058594, y: 339.6617, z: 0}
|
m_LocalPosition: {x: -432.0586, y: -161.33829, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 819818548}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &330585543
|
--- !u!1 &330585543
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -328,6 +328,56 @@ MonoBehaviour:
|
|||||||
mipBias: 0
|
mipBias: 0
|
||||||
varianceClampScale: 0.9
|
varianceClampScale: 0.9
|
||||||
contrastAdaptiveSharpening: 0
|
contrastAdaptiveSharpening: 0
|
||||||
|
--- !u!1 &819818546
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 819818548}
|
||||||
|
- component: {fileID: 819818547}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: root
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &819818547
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 819818546}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 84cefae1a98f84abc971afcf8efcfdc1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
rootRef:
|
||||||
|
m_AssetGUID:
|
||||||
|
m_SubObjectName:
|
||||||
|
m_SubObjectType:
|
||||||
|
m_EditorAssetChanged: 0
|
||||||
|
--- !u!4 &819818548
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 819818546}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 412, y: 501, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 198000832}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1044920372
|
--- !u!1 &1044920372
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -720,6 +770,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 6214202362ba44a71a557a55ce271445, type: 3}
|
m_Script: {fileID: 11500000, guid: 6214202362ba44a71a557a55ce271445, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
ctx: {fileID: 819818547}
|
||||||
btnContainer: {fileID: 1044920372}
|
btnContainer: {fileID: 1044920372}
|
||||||
btn: {fileID: 1956900234}
|
btn: {fileID: 1956900234}
|
||||||
message: {fileID: 2070325010}
|
message: {fileID: 2070325010}
|
||||||
@@ -952,4 +1003,4 @@ SceneRoots:
|
|||||||
- {fileID: 1451597222}
|
- {fileID: 1451597222}
|
||||||
- {fileID: 1788702880}
|
- {fileID: 1788702880}
|
||||||
- {fileID: 1081901322}
|
- {fileID: 1081901322}
|
||||||
- {fileID: 198000832}
|
- {fileID: 819818548}
|
||||||
|
|||||||
@@ -62,13 +62,20 @@ public class AFDeepLinkHelper : MonoBehaviour, IAppsFlyerConversionData, IAppsFl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init()
|
public void Init(string afkey, string afAppID, string customerUserID, string oneLinkID, bool debugMode = false)
|
||||||
{
|
{
|
||||||
AppsFlyer.setIsDebug(true);
|
AppsFlyer.setIsDebug(debugMode);
|
||||||
AppsFlyer.setAppInviteOneLinkID("jT1Q");
|
AppsFlyer.setAppInviteOneLinkID(oneLinkID);
|
||||||
AppsFlyer.initSDK("rSySeWtvKabfbPZE7Lmx7C", "6505145935", this);
|
AppsFlyer.initSDK(afkey, afAppID, this);
|
||||||
|
AppsFlyer.setCustomerUserId(customerUserID);
|
||||||
AppsFlyer.OnDeepLinkReceived += OnDeepLink;
|
AppsFlyer.OnDeepLinkReceived += OnDeepLink;
|
||||||
|
|
||||||
|
#if UNITY_IOS
|
||||||
|
AppsFlyerSDK.AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(30);
|
||||||
|
#endif
|
||||||
|
|
||||||
AppsFlyer.startSDK();
|
AppsFlyer.startSDK();
|
||||||
|
AppsFlyerSDK.AppsFlyerAdRevenue.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> GenInviteLink(string referrerUID, string referrerPID)
|
public async Task<string> GenInviteLink(string referrerUID, string referrerPID)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using AppsFlyerSDK;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
@@ -14,11 +13,8 @@ public class AFInit
|
|||||||
text.text = "";
|
text.text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
[Btn("Init AF")]
|
|
||||||
public void InitAF()
|
public void InitAF()
|
||||||
{
|
{
|
||||||
AFDeepLinkHelper.Instance.Init();
|
|
||||||
text.text = $"Init AF {AppsFlyer.CallBackObjectName}\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Btn("Gen Url")]
|
[Btn("Gen Url")]
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using AppsFlyerSDK;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class OneLinkTest : MonoBehaviour
|
public class OneLinkTest : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[SerializeField] private RootCtx ctx;
|
||||||
|
|
||||||
[SerializeField] private GameObject btnContainer;
|
[SerializeField] private GameObject btnContainer;
|
||||||
|
|
||||||
[SerializeField] private GameObject btn;
|
[SerializeField] private GameObject btn;
|
||||||
@@ -13,10 +17,26 @@ public class OneLinkTest : MonoBehaviour
|
|||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
var aFInit = new AFInit();
|
ctx.OnInited += OnContextInited;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Callback from GContex when its ready
|
||||||
|
private void OnContextInited()
|
||||||
|
{
|
||||||
|
Boost();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Boost()
|
||||||
|
{
|
||||||
|
await Awaiters.NextFrame;
|
||||||
|
|
||||||
|
TaInit();
|
||||||
|
InitAppsFlyer();
|
||||||
|
|
||||||
|
var aFInit = new AFInit();
|
||||||
aFInit.text = message;
|
aFInit.text = message;
|
||||||
// Get funcs methods witch has Btn attribute
|
aFInit.text.text = $"Init AF {AppsFlyer.CallBackObjectName}\n";;
|
||||||
|
|
||||||
var methods = aFInit.GetType().GetMethods();
|
var methods = aFInit.GetType().GetMethods();
|
||||||
foreach (var method in methods)
|
foreach (var method in methods)
|
||||||
{
|
{
|
||||||
@@ -30,7 +50,45 @@ public class OneLinkTest : MonoBehaviour
|
|||||||
btnObj.GetComponent<Button>().onClick.AddListener(() => method.Invoke(aFInit, null));
|
btnObj.GetComponent<Button>().onClick.AddListener(() => method.Invoke(aFInit, null));
|
||||||
btnObj.SetActive(true);
|
btnObj.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void TaInit()
|
||||||
|
{
|
||||||
|
var taAppId = GConstant.TA_APPID;
|
||||||
|
var taUrl = GConstant.TA_URL;
|
||||||
|
var autoTrackEventType = ThinkingData.Analytics.TDAutoTrackEventType.AppStart
|
||||||
|
| ThinkingData.Analytics.TDAutoTrackEventType.AppEnd
|
||||||
|
| ThinkingData.Analytics.TDAutoTrackEventType.AppInstall;
|
||||||
|
|
||||||
|
ThinkingData.Analytics.TDAnalytics.Init(taAppId, taUrl);
|
||||||
|
ThinkingData.Analytics.TDAnalytics.EnableThirdPartySharing(ThinkingData.Analytics.Utils.TDThirdPartyType.APPSFLYER);
|
||||||
|
ThinkingData.Analytics.TDAnalytics.EnableAutoTrack(autoTrackEventType);
|
||||||
|
ThinkingData.Analytics.TDAnalytics.EnableLog(false);
|
||||||
|
|
||||||
|
Debug.Log("[GEvent::TaInit] ThinkingData inited");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void InitAppsFlyer()
|
||||||
|
{
|
||||||
|
var afKey = GConstant.AF_KEY;
|
||||||
|
var afAppID = GConstant.AF_APPID;
|
||||||
|
var afOneLinkID = GConstant.AF_OneLinkID;
|
||||||
|
var afCustomerUserID = ThinkingData.Analytics.TDAnalytics.GetDistinctId();
|
||||||
|
AFDeepLinkHelper.Instance.Init(afKey,afAppID,afCustomerUserID,afOneLinkID,true);
|
||||||
|
Debug.Log("[GEvent::InitAppsFlyer] AppsFlyer inited");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GConstant
|
||||||
|
{
|
||||||
|
public const string TA_URL = "https://ta-event.bamboogames.fun";
|
||||||
|
public const string TA_APPID = "9876bb56ee484b528064d1db40a57ec4";
|
||||||
|
|
||||||
|
public const string AF_KEY = "rSySeWtvKabfbPZE7Lmx7C";
|
||||||
|
public const string AF_APPID = "6505145935";
|
||||||
|
public const string AF_OneLinkID = "jT1Q";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
23
sdk-intergration/Assets/Scripts/RootCtx.cs
Normal file
23
sdk-intergration/Assets/Scripts/RootCtx.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using asap.core;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
public class RootCtx : GContext
|
||||||
|
{
|
||||||
|
protected override async Task SetupAsync()
|
||||||
|
{
|
||||||
|
container.Register<IStageService, StageService>().AsSingleton();
|
||||||
|
//container.Register<IDataService, LubanDataService>().AsSingleton();
|
||||||
|
container.Register<IObjectSerializer, ObjectSerializer>().AsSingleton();
|
||||||
|
container.Register<IConfig, Config>().AsSingleton();
|
||||||
|
|
||||||
|
await Awaiters.NextFrame;
|
||||||
|
BetterStreamingAssets.Initialize();
|
||||||
|
|
||||||
|
|
||||||
|
UnityEngine.Random.InitState((int)System.DateTime.Now.Ticks);
|
||||||
|
|
||||||
|
Screen.sleepTimeout = SleepTimeout.NeverSleep;
|
||||||
|
}
|
||||||
|
}
|
||||||
11
sdk-intergration/Assets/Scripts/RootCtx.cs.meta
Normal file
11
sdk-intergration/Assets/Scripts/RootCtx.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 84cefae1a98f84abc971afcf8efcfdc1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -88,7 +88,29 @@ namespace tysdk
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_ANDROID || UNITY_EDITOR
|
#if UNITY_IOS
|
||||||
|
public class SKUDetail
|
||||||
|
{
|
||||||
|
public string price;
|
||||||
|
public string productId;
|
||||||
|
public string price_currency_code;
|
||||||
|
public string localeCurrencySymbol;
|
||||||
|
public string localizedDescription;
|
||||||
|
public string title;
|
||||||
|
public string type;
|
||||||
|
|
||||||
|
public string ProdPriceStr => price;
|
||||||
|
public float ProdPrice => float.Parse(price);
|
||||||
|
public string ProdID => productId;
|
||||||
|
public string ProdKey;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
public class SKUDetail
|
public class SKUDetail
|
||||||
{
|
{
|
||||||
public string description;
|
public string description;
|
||||||
@@ -110,27 +132,6 @@ namespace tysdk
|
|||||||
public string ProdID => ourProductId;
|
public string ProdID => ourProductId;
|
||||||
public string ProdKey => productId;
|
public string ProdKey => productId;
|
||||||
}
|
}
|
||||||
#elif UNITY_IOS
|
|
||||||
public class SKUDetail
|
|
||||||
{
|
|
||||||
public string price;
|
|
||||||
public string productId;
|
|
||||||
public string price_currency_code;
|
|
||||||
public string localeCurrencySymbol;
|
|
||||||
public string localizedDescription;
|
|
||||||
public string title;
|
|
||||||
public string type;
|
|
||||||
|
|
||||||
public string ProdPriceStr => price;
|
|
||||||
public float ProdPrice => float.Parse(price);
|
|
||||||
public string ProdID => productId;
|
|
||||||
public string ProdKey;
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<packages>
|
<packages>
|
||||||
<package>com.android.installreferrer:installreferrer:2.1</package>
|
<package>com.android.installreferrer:installreferrer:2.1</package>
|
||||||
<package>com.applovin.mediation:facebook-adapter:[6.18.0.0]</package>
|
<package>com.applovin.mediation:facebook-adapter:[6.18.0.1]</package>
|
||||||
<package>com.applovin.mediation:fyber-adapter:8.3.1.1</package>
|
<package>com.applovin.mediation:fyber-adapter:8.3.5.0</package>
|
||||||
<package>com.applovin.mediation:google-adapter:[23.3.0.1]</package>
|
<package>com.applovin.mediation:google-adapter:[23.6.0.2]</package>
|
||||||
<package>com.applovin.mediation:ironsource-adapter:8.3.0.0.2</package>
|
<package>com.applovin.mediation:ironsource-adapter:8.6.1.0.0</package>
|
||||||
<package>com.applovin.mediation:unityads-adapter:4.12.3.0</package>
|
<package>com.applovin.mediation:unityads-adapter:4.12.3.0</package>
|
||||||
<package>com.applovin.mediation:vungle-adapter:7.4.1.2</package>
|
<package>com.applovin.mediation:vungle-adapter:7.4.2.2</package>
|
||||||
<package>com.applovin:applovin-sdk:13.0.0</package>
|
<package>com.applovin:applovin-sdk:13.0.0</package>
|
||||||
<package>com.appsflyer:adrevenue:6.9.1</package>
|
<package>com.appsflyer:adrevenue:6.9.1</package>
|
||||||
<package>com.appsflyer:af-android-sdk:6.14.0</package>
|
<package>com.appsflyer:af-android-sdk:6.14.0</package>
|
||||||
|
|||||||
Reference in New Issue
Block a user