コード例 #1
0
ファイル: QChartboost.cs プロジェクト: Saferer/happy-mapper
        public void InitializeAdService()
        {
#if UNITY_EDITOR
            Debug.Log("Chartboost ads can not be created in the edtior");
#endif
            gameObject.AddComponent <Chartboost>();

            CBSettings chartboostSetttings = ScriptableObject.CreateInstance <CBSettings>();

            chartboostSetttings.androidAppId = QuickAds.instance.ChartboostAndroidId;
            chartboostSetttings.SetAndroidAppId(QuickAds.instance.ChartboostAndroidId);
            chartboostSetttings.androidAppSecret = QuickAds.instance.ChartboostAndroidSign;
            chartboostSetttings.SetAndroidAppSecret(QuickAds.instance.ChartboostAndroidSign);

            chartboostSetttings.iOSAppId = QuickAds.instance.ChartboostIOSId;
            chartboostSetttings.SetIOSAppId(QuickAds.instance.ChartboostIOSId);
            chartboostSetttings.iOSAppSecret = QuickAds.instance.ChartboostIOSSign;
            chartboostSetttings.SetIOSAppSecret(QuickAds.instance.ChartboostIOSSign);

            chartboostSetttings.amazonAppId = QuickAds.instance.ChartboostAmazonId;
            chartboostSetttings.SetAmazonAppId(QuickAds.instance.ChartboostAmazonId);
            chartboostSetttings.amazonAppSecret = QuickAds.instance.ChartboostAmazonSign;
            chartboostSetttings.SetAmazonAppSecret(QuickAds.instance.ChartboostAmazonSign);

            QuickAds.instance.ReportOnScreen("Chartboost initializing");
        }
コード例 #2
0
        // Use this for initialization
        public void Initialize(string appId, string appSignature)
        {
            CBSettings settings = new CBSettings();

            settings.SetIOSAppId(appId);
            settings.SetIOSAppSecret(appSignature);

            Debug.Log("Initialized Chartboost with APP_ID: " + CBSettings.getAndroidAppId() + " SIGN_ID: " + CBSettings.getAndroidAppSecret());
        }
コード例 #3
0
        public void Init()
        {
            print("AAChartboost - Init");

            CBSettings settings = ScriptableObject.CreateInstance <CBSettings>();


            string amazonAppId     = adIds.ChartboostAppIdAmazon;
            string amazonAppSecret = adIds.ChartboostAppSignatureAmazon;

            string androidAppId     = adIds.ChartboostAppIdAndroid;
            string androidAppSecret = adIds.ChartboostAppSignatureAndroid;



            settings.iOSAppId     = adIds.ChartboostAppIdIOS;
            settings.iOSAppSecret = adIds.ChartboostAppSignatureIOS;

            settings.SetIOSAppId(adIds.ChartboostAppIdIOS);
            settings.SetIOSAppSecret(adIds.ChartboostAppSignatureIOS);



#if ANDROID_AMAZON
            SetAndroidIds(settings, amazonAppId, amazonAppSecret);
#else
            SetAndroidIds(settings, androidAppId, androidAppSecret);
#endif



            var c = FindObjectOfType <Chartboost>();

            if (c == null)
            {
                gameObject.AddComponent <Chartboost>();
            }

            Chartboost.setAutoCacheAds(true);
            Chartboost.cacheInterstitial(CBLocation.Default);
            Chartboost.cacheInterstitial(CBLocation.Startup);
            Chartboost.cacheRewardedVideo(CBLocation.Default);
        }
コード例 #4
0
    // Use this for initialization
    public void Initialize(string appId, string appSignature, GameObject mainController)
    {
        app_ID        = appId;
        app_Signature = appSignature;
        CBSettings settings = new CBSettings();


                #if UNITY_ANDROID
        settings.SetAndroidAppId(app_ID);
        settings.SetAndroidAppSecret(app_Signature);
                #endif

                #if UNITY_IOS
        settings.SetIOSAppId(app_ID);
        settings.SetIOSAppSecret(app_Signature);
                #endif



        mainController.AddComponent <Chartboost> ();

        Chartboost.cacheInterstitial(CBLocation.Default);
    }