private void createHandler(Camera camera,
                            GameObject gameObject)
 {
     this.handler             = gameObject.AddComponent <NativeAdHandler> ();
     this.handler.minAlpha    = NativeAd.MIN_ALPHA;
     this.handler.maxRotation = NativeAd.MAX_ROTATION;
     this.handler.checkViewabilityInterval = NativeAd.CHECK_VIEWABILITY_INTERVAL;
     this.handler.validationCallback       = (delegate(bool success) {
         if (success)
         {
             this.ExternalLogImpression();
         }
     });
 }
Пример #2
0
 private void createHandler(Camera camera,
                            GameObject gameObject)
 {
     this.handler             = gameObject.AddComponent <NativeAdHandler> ();
     this.handler.camera      = camera;
     this.handler.minAlpha    = NativeAd.MIN_ALPHA;
     this.handler.maxRotation = NativeAd.MAX_ROTATION;
     this.handler.checkViewabilityInterval = NativeAd.CHECK_VIEWABILITY_INTERVAL;
     this.handler.validationCallback       = (delegate(bool success) {
         Debug.Log("Native ad viewability check for unique id " + this.uniqueId + " returned success? " + success);
         if (success)
         {
             AdLogger.Log("Native ad with unique id " + this.uniqueId + " registered impression!");
             this.ExternalLogImpression();
             this.handler.stopImpressionValidation();
         }
     });
 }
Пример #3
0
 private void createHandler(Camera camera, GameObject gameObject)
 {
     handler             = gameObject.AddComponent <NativeAdHandler>();
     handler.camera      = camera;
     handler.minAlpha    = 0.9f;
     handler.maxRotation = 45;
     handler.checkViewabilityInterval = 1;
     handler.validationCallback       = delegate(bool success)
     {
         UnityEngine.Debug.Log("Native ad viewability check for unique id " + uniqueId + " returned success? " + success);
         if (success)
         {
             AdLogger.Log("Native ad with unique id " + uniqueId + " registered impression!");
             ExternalLogImpression();
             handler.stopImpressionValidation();
         }
     };
 }
Пример #4
0
 private void createHandler (Camera camera,
                             GameObject gameObject)
 {
     this.handler = gameObject.AddComponent<NativeAdHandler> ();
     this.handler.minAlpha = NativeAd.MIN_ALPHA;
     this.handler.maxRotation = NativeAd.MAX_ROTATION;
     this.handler.checkViewabilityInterval = NativeAd.CHECK_VIEWABILITY_INTERVAL;
     this.handler.validationCallback = (delegate(bool success) {
         if (success) {
             this.ExternalLogImpression ();
         }
     });
 }