コード例 #1
0
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #2
0
        void Start()
        {
            AMRSdkConfig config = new AMRSdkConfig();

            config.ApplicationIdAndroid = "";
            config.ApplicationIdIOS     = "72bd5c31-3ddb-411a-b355-fdd88bd223dc";

            config.BannerIdAndroid = "";
            config.BannerIdIOS     = "c4b90936-20e5-4919-b83c-f4d7fd3d4e25";

            config.InterstitialIdAndroid = "";
            config.InterstitialIdIOS     = "d3523276-87eb-42f3-a5f1-c38ea3f0a702";

            config.RewardedVideoIdAndroid = "";
            config.RewardedVideoIdIOS     = "a5690814-40ba-4afc-a028-26b1857ab816";

            //config.OfferWallIdAndroid = "<Your Android Offerwall Zone Id>";
            //config.OfferWallIdIOS = "<Your IOS Offerwall Zone Id>";

            AMRSDK.startWithConfig(config);

            //AMRSDK.loadBanner(Enums.AMRSDKBannerPosition.BannerPositionBottom, true);

            AMRSDK.loadInterstitial();
            AMRSDK.loadRewardedVideo();

            AMRSDK.setOnBannerReady(onBannerReady);
            AMRSDK.setOnBannerFail(onBannerFail);
            AMRSDK.setOnBannerClick(onBannerClick);

            AMRSDK.setOnInterstitialReady(OnInterstitialReady);
            AMRSDK.setOnInterstitialFail(OnInterstitialFail);
            AMRSDK.setOnInterstitialShow(OnInterstitialShow);
            AMRSDK.setOnInterstitialClick(OnInterstitialClick);
            AMRSDK.setOnInterstitialDismiss(OnInterstitialDismiss);

            AMRSDK.setOnRewardedVideoReady(OnVideoReady);

            AMRSDK.setOnRewardedVideoFail(OnVideoFail);
            AMRSDK.setOnRewardedVideoShow(OnVideoShow);
            AMRSDK.setOnRewardedVideoClick(OnVideoClick);
            AMRSDK.setOnRewardedVideoDismiss(OnVideoDismiss);
            AMRSDK.setOnRewardedVideoComplete(OnVideoComplete);
        }
コード例 #3
0
        public static void startWithConfig(AMRSdkConfig config)
        {
            AMRUtil.Log("<AMRSDK> AMR Plugin Version: [" + AMR_PLUGIN_VERSION + "]");

            if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
            {
                Instance.Config = config;
                if (config.SubjectToGDPR != null || config.UserConsent != null)
                {
                    Instance.startWithAppIdConsent(config.ApplicationIdIOS, config.ApplicationIdAndroid, config.SubjectToGDPR, config.UserConsent, config.IsUserChild);
                }
                else
                {
                    Instance.startWithAppId(config.ApplicationIdIOS, config.ApplicationIdAndroid, config.IsUserChild);
                }
                Instance.isInitialized = true;
            }
            else
            {
                AMRUtil.Log("<AMRSDK> AMRSDK only supports Android and iOS platforms.");
            }
        }