sdkbox / sdkbox-sample-ccc200

SDKBox Plugins with cocos creator 2.0 version
8 stars 6 forks source link

i taked this fault. #1

Closed orcuncun closed 5 years ago

orcuncun commented 5 years ago

Simulator: E/jswrapper (271): ERROR: Uncaught ReferenceError: sdkbox is not defined, location: assets/Script/HelloWorld.js:0:0

ghost commented 5 years ago

which branch?

orcuncun commented 5 years ago

I solved the problem. But I'm having problems in the other (SDKBOX Ads ). The ad is not showing. I just tried the admob. Should I also try other advertising companies for Sdbox?

orcuncun commented 5 years ago

When I use "sdkbox ads", I need to import "admob" and other ad add-ons?

orcuncun commented 5 years ago

i can show ads with codes. const adName = 'interstitial'; //interstitial ad // const adName = 'reward'; //reward video if (sdkbox.PluginAdMob.isAvailable(adName)) { sdkbox.PluginAdMob.show(adName); } else { this.log(adName + ' is not available'); sdkbox.PluginAdMob.cache(adName); } But i cant show ads with codes. onButton1: function() { const placement = 'placement-1'; if (sdkbox.PluginSdkboxAds.isAvailable(placement)) { sdkbox.PluginSdkboxAds.placement(placement); } else { this.log(placement + ' is not available'); } },

onButton2: function() {
    sdkbox.PluginSdkboxAds.playAd("AdMob", "interstitial");
    //sdkbox.PluginSdkboxAds.playAd("UnityAds", "rewardedVideo");
},

Can you explain the difference What should I do to use the 2nd part? Admob ads were not displayed when using Chapter 2.

orcuncun commented 5 years ago

i solved this problem. But i taked this fault. this placement is not available.