This commit is contained in:
chenxi 2023-07-19 11:29:22 +08:00
parent 045ecb7df3
commit 78033e031f
22 changed files with 799 additions and 20 deletions

View File

@ -3,6 +3,7 @@ using UnityEngine;
using BF.NativeCore.ThirdPlatform; using BF.NativeCore.ThirdPlatform;
using Newtonsoft.Json; using Newtonsoft.Json;
using com.adjust.sdk; using com.adjust.sdk;
using AppsFlyerSDK;
namespace BF namespace BF
{ {
@ -10,6 +11,7 @@ namespace BF
{ {
private ThinkingAnalyticsSdk TASdk = new ThinkingAnalyticsSdk(); private ThinkingAnalyticsSdk TASdk = new ThinkingAnalyticsSdk();
private AppsFlyerSdk AFSdk = new AppsFlyerSdk(); private AppsFlyerSdk AFSdk = new AppsFlyerSdk();
private bool isInitAFAdRevenue = false;
void Start() void Start()
{ {
@ -30,6 +32,16 @@ namespace BF
AFSdk.SetTaAccountId(id); AFSdk.SetTaAccountId(id);
} }
public void InitAppsFlyerAdRevenue()
{
if (isInitAFAdRevenue)
{
return;
}
isInitAFAdRevenue = true;
AppsFlyerAdRevenue.start();
}
// 清除账户id // 清除账户id
public void ClearThinkingAnalyticsAccountId() public void ClearThinkingAnalyticsAccountId()
{ {
@ -144,5 +156,12 @@ namespace BF
{ {
Adjust.setDeviceToken(token); Adjust.setDeviceToken(token);
} }
public void LogAppsFlyerAdRevenue(int mediationNetwork, string monetizationNetwork, double eventRevenue, string data)
{
var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
var mediationNetworkType = (AppsFlyerAdRevenueMediationNetworkType)mediationNetwork;
AppsFlyerAdRevenue.logAdRevenue(monetizationNetwork, mediationNetworkType, eventRevenue, "USD", properties);
}
} }
} }

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 630dd76fcc178442fa3ca0f30af6b492
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,34 @@
using System.Collections;
using UnityEngine;
public class AFAdRevenueEvent {
/**
*Pre-defined keys for non-mandatory dictionary
*Code ISO 3166-1 format
**/
public const string COUNTRY = "country";
/**
*ID of the ad unit for the impression
**/
public const string AD_UNIT = "ad_unit";
/**
*Format of the ad
**/
public const string AD_TYPE = "ad_type";
/**
*ID of the ad placement for the impression
**/
public const string PLACEMENT = "placement";
/**
*Provided by Facebook Audience Network only, and will be reported to publishers
*approved by Facebook Audience Network within the closed beta
**/
public const string ECPM_PAYLOAD = "ecpm_payload";
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 597a8e5b837f64353b0aa9af2fe9aa84
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,173 @@
using System.Collections.Generic;
using UnityEngine;
using System.Runtime.InteropServices;
using System;
namespace AppsFlyerSDK
{
public class AppsFlyerAdRevenue : MonoBehaviour
{
public static readonly string kAppsFlyerAdRevenueVersion = "6.5.4";
#if UNITY_ANDROID && !UNITY_EDITOR
private static AndroidJavaClass appsFlyerAndroid = new AndroidJavaClass("com.appsflyer.unity.afunityadrevenuegenericplugin.AdRevenueUnityWrapper");
#endif
public static void start()
{
#if UNITY_IOS && !UNITY_EDITOR
_start();
#elif UNITY_ANDROID && !UNITY_EDITOR
using(AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
using(AndroidJavaObject cls_Activity = cls_UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity")) {
AndroidJavaObject cls_Application = cls_Activity.Call<AndroidJavaObject>("getApplication");
appsFlyerAndroid.CallStatic("start", cls_Application);
}
}
#else
#endif
}
public static void setIsDebug(bool isDebug)
{
#if UNITY_IOS && !UNITY_EDITOR
_setIsDebugAdrevenue(isDebug);
#elif UNITY_ANDROID && !UNITY_EDITOR
#else
#endif
}
public static void logAdRevenue(string monetizationNetwork,
AppsFlyerAdRevenueMediationNetworkType mediationNetwork,
double eventRevenue,
string revenueCurrency,
Dictionary<string, string> additionalParameters)
{
#if UNITY_IOS && !UNITY_EDITOR
_logAdRevenue(monetizationNetwork, mediationNetwork, eventRevenue, revenueCurrency, AFMiniJSON.Json.Serialize(additionalParameters));
#elif UNITY_ANDROID && !UNITY_EDITOR
int mediationNetworkAndroid = setMediationNetworkTypeAndroid(mediationNetwork);
if (mediationNetworkAndroid == -1)
{
Debug.Log("Please choose a valid mediationNetwork");
} else
{
appsFlyerAndroid.CallStatic("logAdRevenue",
monetizationNetwork,
mediationNetworkAndroid,
revenueCurrency,
eventRevenue,
convertDictionaryToJavaMap(additionalParameters));
}
#else
#endif
}
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void _start();
[DllImport("__Internal")]
private static extern void _setIsDebugAdrevenue(bool isDebug);
[DllImport("__Internal")]
private static extern void _logAdRevenue(string monetizationNetwork,
AppsFlyerAdRevenueMediationNetworkType mediationNetwork,
double eventRevenue,
string revenueCurrency,
string additionalParameters);
#elif UNITY_ANDROID && !UNITY_EDITOR
#else
#endif
private static int setMediationNetworkTypeAndroid(AppsFlyerAdRevenueMediationNetworkType mediationNetwork)
{
switch (mediationNetwork)
{
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeIronSource:
return 0;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeApplovinMax:
return 1;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeGoogleAdMob:
return 2;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeFyber:
return 3;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAppodeal:
return 4;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAdmost:
return 5;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeTopon:
return 6;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeTradplus:
return 7;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeYandex:
return 8;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeChartBoost:
return 9;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeUnity:
return 10;
default:
return -1;
}
}
private static AndroidJavaObject convertDictionaryToJavaMap(Dictionary<string, string> dictionary)
{
AndroidJavaObject map = new AndroidJavaObject("java.util.HashMap");
IntPtr putMethod = AndroidJNIHelper.GetMethodID(map.GetRawClass(), "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
jvalue[] val;
if (dictionary != null)
{
foreach (var entry in dictionary)
{
val = AndroidJNIHelper.CreateJNIArgArray(new object[] { entry.Key, entry.Value });
AndroidJNI.CallObjectMethod(map.GetRawObject(), putMethod, val);
AndroidJNI.DeleteLocalRef(val[0].l);
AndroidJNI.DeleteLocalRef(val[1].l);
}
}
return map;
}
}
public enum AppsFlyerAdRevenueMediationNetworkType
{
AppsFlyerAdRevenueMediationNetworkTypeGoogleAdMob = 1,
AppsFlyerAdRevenueMediationNetworkTypeIronSource = 2,
AppsFlyerAdRevenueMediationNetworkTypeApplovinMax = 3,
AppsFlyerAdRevenueMediationNetworkTypeFyber = 4,
AppsFlyerAdRevenueMediationNetworkTypeAppodeal = 5,
AppsFlyerAdRevenueMediationNetworkTypeAdmost = 6,
AppsFlyerAdRevenueMediationNetworkTypeTopon = 7,
AppsFlyerAdRevenueMediationNetworkTypeTradplus = 8,
AppsFlyerAdRevenueMediationNetworkTypeYandex = 9,
AppsFlyerAdRevenueMediationNetworkTypeChartBoost = 10,
AppsFlyerAdRevenueMediationNetworkTypeUnity = 11
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4ede466cf9e884fcb90bfec949dc6f04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0609a17cae7624f34a54832ea3d1c0c8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dependencies>
<androidPackages>
<androidPackage spec="com.appsflyer:adrevenue:6.5.4"></androidPackage>
<androidPackage spec="com.appsflyer:unity-adrevenue-generic-wrapper:6.5.4"></androidPackage>
</androidPackages>
<iosPods>
<iosPod name="AppsFlyer-AdRevenue" version="6.5.4" minTargetSdk="10.0">
</iosPod>
</iosPods>
</dependencies>

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: be56133c4df9044cd80f33b9f323a35d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f213c52c0a9334f30a7d716ba4f2bfbf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2aa6c4c4e493f462a999a5bb638f5233
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
//
// AppsFlyerAdRevenueWrapper.h
// Unity-iPhone
//
// Created by Jonathan Wesfield on 01/12/2019.
//
#import <Foundation/Foundation.h>
#import "AFUnityUtils.mm"
#if __has_include(<AppsFlyerAdRevenue/AppsFlyerAdRevenue.h>)
#import <AppsFlyerAdRevenue/AppsFlyerAdRevenue.h>
#endif
@interface AppsFlyerAdRevenueWrapper : NSObject
@end

View File

@ -0,0 +1,27 @@
fileFormatVersion: 2
guid: 403bcefbab2d04a9da127ba76b99627b
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
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,38 @@
//
// AppsFlyerAdRevenueWrapper.mm
// Unity-iPhone
//
// Created by Jonathan Wesfield on 25/11/2019.
//
#import "AppsFlyerAdRevenueWrapper.h"
@implementation AppsFlyerAdRevenueWrapper
extern "C" {
const void _start(int length, int* adRevenueTypes){
[AppsFlyerAdRevenue start];
}
const void _setIsDebugAdrevenue(bool isDebug){
[[AppsFlyerAdRevenue shared] setIsDebug:isDebug];
}
const void _logAdRevenue(const char* monetizationNetwork,
int mediationNetwork,
double eventRevenue,
const char* revenueCurrency,
const char* additionalParameters){
[[AppsFlyerAdRevenue shared] logAdRevenueWithMonetizationNetwork:stringFromChar(monetizationNetwork)
mediationNetwork:(AppsFlyerAdRevenueMediationNetworkType) mediationNetwork
eventRevenue:[NSNumber numberWithDouble:eventRevenue]
revenueCurrency:stringFromChar(revenueCurrency)
additionalParameters:dictionaryFromJson(additionalParameters)];
}
}
@end

View File

@ -0,0 +1,37 @@
fileFormatVersion: 2
guid: 476b7c27be2254b7abe547c3679f9d9f
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:

View File

@ -0,0 +1 @@
import Foundation

View File

@ -0,0 +1,37 @@
fileFormatVersion: 2
guid: fd2ed24dc5b354bb29dcd1b72840370c
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:

View File

@ -0,0 +1,89 @@
#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif
using XLua;
using System.Collections.Generic;
namespace XLua.CSObjectWrap
{
using Utils = XLua.Utils;
public class AFAdRevenueEventWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(AFAdRevenueEvent);
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 6, 0, 0);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "COUNTRY", AFAdRevenueEvent.COUNTRY);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AD_UNIT", AFAdRevenueEvent.AD_UNIT);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AD_TYPE", AFAdRevenueEvent.AD_TYPE);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PLACEMENT", AFAdRevenueEvent.PLACEMENT);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ECPM_PAYLOAD", AFAdRevenueEvent.ECPM_PAYLOAD);
Utils.EndClassRegister(type, L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
var gen_ret = new AFAdRevenueEvent();
translator.Push(L, gen_ret);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to AFAdRevenueEvent constructor!");
}
}
}

View File

@ -0,0 +1,165 @@
#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif
using XLua;
using System.Collections.Generic;
namespace XLua.CSObjectWrap
{
using Utils = XLua.Utils;
public class AppsFlyerSDKAppsFlyerAdRevenueWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(AppsFlyerSDK.AppsFlyerAdRevenue);
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 5, 0, 0);
Utils.RegisterFunc(L, Utils.CLS_IDX, "start", _m_start_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "setIsDebug", _m_setIsDebug_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "logAdRevenue", _m_logAdRevenue_xlua_st_);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "kAppsFlyerAdRevenueVersion", AppsFlyerSDK.AppsFlyerAdRevenue.kAppsFlyerAdRevenueVersion);
Utils.EndClassRegister(type, L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
var gen_ret = new AppsFlyerSDK.AppsFlyerAdRevenue();
translator.Push(L, gen_ret);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to AppsFlyerSDK.AppsFlyerAdRevenue constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_start_xlua_st_(RealStatePtr L)
{
try {
{
AppsFlyerSDK.AppsFlyerAdRevenue.start( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_setIsDebug_xlua_st_(RealStatePtr L)
{
try {
{
bool _isDebug = LuaAPI.lua_toboolean(L, 1);
AppsFlyerSDK.AppsFlyerAdRevenue.setIsDebug( _isDebug );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_logAdRevenue_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
{
string _monetizationNetwork = LuaAPI.lua_tostring(L, 1);
AppsFlyerSDK.AppsFlyerAdRevenueMediationNetworkType _mediationNetwork;translator.Get(L, 2, out _mediationNetwork);
double _eventRevenue = LuaAPI.lua_tonumber(L, 3);
string _revenueCurrency = LuaAPI.lua_tostring(L, 4);
System.Collections.Generic.Dictionary<string, string> _additionalParameters = (System.Collections.Generic.Dictionary<string, string>)translator.GetObject(L, 5, typeof(System.Collections.Generic.Dictionary<string, string>));
AppsFlyerSDK.AppsFlyerAdRevenue.logAdRevenue( _monetizationNetwork, _mediationNetwork, _eventRevenue, _revenueCurrency, _additionalParameters );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
}
}

View File

@ -21,10 +21,11 @@ namespace XLua.CSObjectWrap
{ {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.BFThirdReportSDKManager); System.Type type = typeof(BF.BFThirdReportSDKManager);
Utils.BeginObjectRegister(type, L, translator, 0, 14, 0, 0); Utils.BeginObjectRegister(type, L, translator, 0, 16, 0, 0);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetThinkingAnalyticsAccountId", _m_SetThinkingAnalyticsAccountId); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetThinkingAnalyticsAccountId", _m_SetThinkingAnalyticsAccountId);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitAppsFlyerAdRevenue", _m_InitAppsFlyerAdRevenue);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearThinkingAnalyticsAccountId", _m_ClearThinkingAnalyticsAccountId); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearThinkingAnalyticsAccountId", _m_ClearThinkingAnalyticsAccountId);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostThinkingAnalyticsEvent", _m_PostThinkingAnalyticsEvent); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostThinkingAnalyticsEvent", _m_PostThinkingAnalyticsEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostThinkingAnalyticsEventName", _m_PostThinkingAnalyticsEventName); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostThinkingAnalyticsEventName", _m_PostThinkingAnalyticsEventName);
@ -37,6 +38,7 @@ namespace XLua.CSObjectWrap
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostAdjustPartnerTrackEvent", _m_PostAdjustPartnerTrackEvent); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostAdjustPartnerTrackEvent", _m_PostAdjustPartnerTrackEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostAdjustAdRevenueAppLovinMAX", _m_PostAdjustAdRevenueAppLovinMAX); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostAdjustAdRevenueAppLovinMAX", _m_PostAdjustAdRevenueAppLovinMAX);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AdjustSetDeviceToken", _m_AdjustSetDeviceToken); Utils.RegisterFunc(L, Utils.METHOD_IDX, "AdjustSetDeviceToken", _m_AdjustSetDeviceToken);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LogAppsFlyerAdRevenue", _m_LogAppsFlyerAdRevenue);
@ -131,6 +133,33 @@ namespace XLua.CSObjectWrap
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_InitAppsFlyerAdRevenue(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BFThirdReportSDKManager gen_to_be_invoked = (BF.BFThirdReportSDKManager)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.InitAppsFlyerAdRevenue( );
return 0; return 0;
} }
@ -556,6 +585,37 @@ namespace XLua.CSObjectWrap
} }
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_LogAppsFlyerAdRevenue(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BFThirdReportSDKManager gen_to_be_invoked = (BF.BFThirdReportSDKManager)translator.FastGetCSObj(L, 1);
{
int _mediationNetwork = LuaAPI.xlua_tointeger(L, 2);
string _monetizationNetwork = LuaAPI.lua_tostring(L, 3);
double _eventRevenue = LuaAPI.lua_tonumber(L, 4);
string _data = LuaAPI.lua_tostring(L, 5);
gen_to_be_invoked.LogAppsFlyerAdRevenue( _mediationNetwork, _monetizationNetwork, _eventRevenue, _data );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}

View File

@ -2271,6 +2271,9 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(MonkeyPost), MonkeyPostWrap.__Register); translator.DelayWrapLoader(typeof(MonkeyPost), MonkeyPostWrap.__Register);
translator.DelayWrapLoader(typeof(AFAdRevenueEvent), AFAdRevenueEventWrap.__Register);
translator.DelayWrapLoader(typeof(UIInputHelper), UIInputHelperWrap.__Register); translator.DelayWrapLoader(typeof(UIInputHelper), UIInputHelperWrap.__Register);
@ -2369,14 +2372,14 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(IronSourceConstants), IronSourceConstantsWrap.__Register); translator.DelayWrapLoader(typeof(IronSourceConstants), IronSourceConstantsWrap.__Register);
translator.DelayWrapLoader(typeof(IronSourceError), IronSourceErrorWrap.__Register);
} }
static void wrapInit15(LuaEnv luaenv, ObjectTranslator translator) static void wrapInit15(LuaEnv luaenv, ObjectTranslator translator)
{ {
translator.DelayWrapLoader(typeof(IronSourceError), IronSourceErrorWrap.__Register);
translator.DelayWrapLoader(typeof(IronSourceEvents), IronSourceEventsWrap.__Register); translator.DelayWrapLoader(typeof(IronSourceEvents), IronSourceEventsWrap.__Register);
@ -2479,6 +2482,9 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(IronSourceJSON.Json), IronSourceJSONJsonWrap.__Register); translator.DelayWrapLoader(typeof(IronSourceJSON.Json), IronSourceJSONJsonWrap.__Register);
translator.DelayWrapLoader(typeof(AppsFlyerSDK.AppsFlyerAdRevenue), AppsFlyerSDKAppsFlyerAdRevenueWrap.__Register);
translator.DelayWrapLoader(typeof(com.adjust.sdk.JSONNode), comadjustsdkJSONNodeWrap.__Register); translator.DelayWrapLoader(typeof(com.adjust.sdk.JSONNode), comadjustsdkJSONNodeWrap.__Register);
@ -2523,16 +2529,16 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustLogLevelExtension), comadjustsdkAdjustLogLevelExtensionWrap.__Register); translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustLogLevelExtension), comadjustsdkAdjustLogLevelExtensionWrap.__Register);
}
static void wrapInit16(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustPlayStoreSubscription), comadjustsdkAdjustPlayStoreSubscriptionWrap.__Register); translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustPlayStoreSubscription), comadjustsdkAdjustPlayStoreSubscriptionWrap.__Register);
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustSessionFailure), comadjustsdkAdjustSessionFailureWrap.__Register); translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustSessionFailure), comadjustsdkAdjustSessionFailureWrap.__Register);
}
static void wrapInit16(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustSessionSuccess), comadjustsdkAdjustSessionSuccessWrap.__Register); translator.DelayWrapLoader(typeof(com.adjust.sdk.AdjustSessionSuccess), comadjustsdkAdjustSessionSuccessWrap.__Register);
@ -2680,16 +2686,16 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(UnityEngine.Camera.RenderRequestOutputSpace), UnityEngineCameraRenderRequestOutputSpaceWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.Camera.RenderRequestOutputSpace), UnityEngineCameraRenderRequestOutputSpaceWrap.__Register);
}
static void wrapInit17(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(UnityEngine.TextCore.FaceInfo), UnityEngineTextCoreFaceInfoWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.TextCore.FaceInfo), UnityEngineTextCoreFaceInfoWrap.__Register);
translator.DelayWrapLoader(typeof(UnityEngine.Rendering.LightShadowResolution), UnityEngineRenderingLightShadowResolutionWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.Rendering.LightShadowResolution), UnityEngineRenderingLightShadowResolutionWrap.__Register);
}
static void wrapInit17(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(UnityEngine.RenderTextureFormat), UnityEngineRenderTextureFormatWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.RenderTextureFormat), UnityEngineRenderTextureFormatWrap.__Register);
@ -2837,16 +2843,16 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(UnityEngine.UI.ScrollRect.MovementType), UnityEngineUIScrollRectMovementTypeWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.UI.ScrollRect.MovementType), UnityEngineUIScrollRectMovementTypeWrap.__Register);
}
static void wrapInit18(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(UnityEngine.UI.ScrollRect.ScrollbarVisibility), UnityEngineUIScrollRectScrollbarVisibilityWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.UI.ScrollRect.ScrollbarVisibility), UnityEngineUIScrollRectScrollbarVisibilityWrap.__Register);
translator.DelayWrapLoader(typeof(UnityEngine.UI.Slider.Direction), UnityEngineUISliderDirectionWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.UI.Slider.Direction), UnityEngineUISliderDirectionWrap.__Register);
}
static void wrapInit18(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(UnityEngine.UI.Toggle.ToggleTransition), UnityEngineUIToggleToggleTransitionWrap.__Register); translator.DelayWrapLoader(typeof(UnityEngine.UI.Toggle.ToggleTransition), UnityEngineUIToggleToggleTransitionWrap.__Register);
@ -2994,16 +3000,16 @@ namespace XLua.CSObjectWrap
translator.DelayWrapLoader(typeof(ThinkingAnalytics.ThinkingAnalyticsAPI.TATimeZone), ThinkingAnalyticsThinkingAnalyticsAPITATimeZoneWrap.__Register); translator.DelayWrapLoader(typeof(ThinkingAnalytics.ThinkingAnalyticsAPI.TATimeZone), ThinkingAnalyticsThinkingAnalyticsAPITATimeZoneWrap.__Register);
}
static void wrapInit19(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(ThinkingAnalytics.ThinkingAnalyticsAPI.TAMode), ThinkingAnalyticsThinkingAnalyticsAPITAModeWrap.__Register); translator.DelayWrapLoader(typeof(ThinkingAnalytics.ThinkingAnalyticsAPI.TAMode), ThinkingAnalyticsThinkingAnalyticsAPITAModeWrap.__Register);
translator.DelayWrapLoader(typeof(ThinkingAnalytics.ThinkingAnalyticsAPI.NetworkType), ThinkingAnalyticsThinkingAnalyticsAPINetworkTypeWrap.__Register); translator.DelayWrapLoader(typeof(ThinkingAnalytics.ThinkingAnalyticsAPI.NetworkType), ThinkingAnalyticsThinkingAnalyticsAPINetworkTypeWrap.__Register);
}
static void wrapInit19(LuaEnv luaenv, ObjectTranslator translator)
{
translator.DelayWrapLoader(typeof(Http.RequestState), HttpRequestStateWrap.__Register); translator.DelayWrapLoader(typeof(Http.RequestState), HttpRequestStateWrap.__Register);

View File

@ -201,6 +201,7 @@
<type fullname="UIOutlineEffect" preserve="all"/> <type fullname="UIOutlineEffect" preserve="all"/>
<type fullname="UIResGhostTweenEffect" preserve="all"/> <type fullname="UIResGhostTweenEffect" preserve="all"/>
<type fullname="MonkeyPost" preserve="all"/> <type fullname="MonkeyPost" preserve="all"/>
<type fullname="AFAdRevenueEvent" preserve="all"/>
<type fullname="UIInputHelper" preserve="all"/> <type fullname="UIInputHelper" preserve="all"/>
<type fullname="FBWindowsA2UNotificationsManager" preserve="all"/> <type fullname="FBWindowsA2UNotificationsManager" preserve="all"/>
<type fullname="FBWindowsADSManager" preserve="all"/> <type fullname="FBWindowsADSManager" preserve="all"/>
@ -269,6 +270,7 @@
<type fullname="ThinkingAnalytics.Utils.TD_PropertiesChecker" preserve="all"/> <type fullname="ThinkingAnalytics.Utils.TD_PropertiesChecker" preserve="all"/>
<type fullname="ThinkingAnalytics.TaException.ThinkingSDKExceptionHandler" preserve="all"/> <type fullname="ThinkingAnalytics.TaException.ThinkingSDKExceptionHandler" preserve="all"/>
<type fullname="IronSourceJSON.Json" preserve="all"/> <type fullname="IronSourceJSON.Json" preserve="all"/>
<type fullname="AppsFlyerSDK.AppsFlyerAdRevenue" preserve="all"/>
<type fullname="com.adjust.sdk.JSONNode" preserve="all"/> <type fullname="com.adjust.sdk.JSONNode" preserve="all"/>
<type fullname="com.adjust.sdk.JSONArray" preserve="all"/> <type fullname="com.adjust.sdk.JSONArray" preserve="all"/>
<type fullname="com.adjust.sdk.JSONClass" preserve="all"/> <type fullname="com.adjust.sdk.JSONClass" preserve="all"/>