public void initBtnClick() { Debug.Log("rextest initBtnClick"); Debug.Log("rextest initBtnClick111222"); SdkMgr.Instance().init(); Debug.Log("rextest initBtnClick111"); }
private void Awake() { mInstance = this; Debug.Log("rextest 111"); #if UNITY_EDITOR Debug.Log("rextest 222"); mSdkApi = new SdkForAndroid(); #elif UNITY_ANDROID Debug.Log("rextest 333"); mSdkApi = new SdkForAndroid(); #endif }
void Start() { if (instance != null) { return; } instance = this; adLoadTimes = 0; DontDestroyOnLoad(gameObject); #if UNITY_IOS //初始化talkingdata TalkingDataGA.OnStart("E6E6D9152518498E82080F5E7FCE53C7", "GameBoxIOS"); TDGAAccount.SetAccount(TalkingDataGA.GetDeviceId()); //初始化ironsource IronSource.Agent.init("a08caf45", IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.BANNER); #elif UNITY_ANDROID //初始化talkingdata TalkingDataGA.OnStart("E6E6D9152518498E82080F5E7FCE53C7", "GameBoxGoogle"); TDGAAccount.SetAccount(TalkingDataGA.GetDeviceId()); //初始化ironsource IronSource.Agent.init("a1c25d55", IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.BANNER); #endif IronSource.Agent.shouldTrackNetworkState(true); IronSourceEvents.onRewardedVideoAdShowFailedEvent += onRewardedVideoAdShowFailedEvent; IronSourceEvents.onRewardedVideoAdClosedEvent += onRewardedVideoAdClosedEvent; IronSourceEvents.onRewardedVideoAdRewardedEvent += onRewardedVideoAdRewardedEvent; IronSourceEvents.onInterstitialAdClosedEvent += onInterstitialAdClosedEvent; IronSource.Agent.loadInterstitial(); }