the type or namespace name 'CBBinding' could not be found.,the name 'CBBinding' does not exist in the current context
using UnityEngine; using System.Collections; using Chartboost;
public class CBads : MonoBehaviour {
public bool shown = false;
// Use this for initialization
private CBads CB;
private CBManager
void Start () {
#if UNITY_ANDROID
CBBinding.init();
#endif
CB.cacheInterstitial(null);
CB.showInterstitial(null);
}
public void ShowAd(string location = null){
CB.showInterstitial(location);
}
void OnEnable()
{
// Listen to all impression-related events
CBManager.didFailToLoadInterstitialEvent += didFailToLoadInterstitialEvent;
CBManager.didDismissInterstitialEvent += didDismissInterstitialEvent;
CBManager.didCloseInterstitialEvent += didCloseInterstitialEvent;
CBManager.didClickInterstitialEvent += didClickInterstitialEvent;
CBManager.didShowInterstitialEvent += didShowInterstitialEvent;
}
void OnDisable()
{
// Remove event handlers
CBManager.didFailToLoadInterstitialEvent -= didFailToLoadInterstitialEvent;
CBManager.didDismissInterstitialEvent -= didDismissInterstitialEvent;
CBManager.didCloseInterstitialEvent -= didCloseInterstitialEvent;
CBManager.didClickInterstitialEvent -= didClickInterstitialEvent;
CBManager.didShowInterstitialEvent -= didShowInterstitialEvent;
}
void didFailToLoadInterstitialEvent( string location ){
shown = false;
}
void didDismissInterstitialEvent( string location ){
CB.cacheInterstitial(location);
shown = true;
}
void didCloseInterstitialEvent( string location ){
shown = true;
}
void didClickInterstitialEvent( string location ){
shown = true;
}
void didShowInterstitialEvent( string location ){
shown = true;
}
}
Comment