Beispiel #1
0
 public static void InitializeRewardedAdSystem(string[] adUnits)
 {
     if (Application.isEditor)
     {
         return;
     }
     MCAdsBinding.LogInfo(MethodBase.GetCurrentMethod().Name);
     MCAdsBinding.GetAdvertisingId();
     if (adUnits.Length < 1)
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
         return;
     }
     if (adUnits.Length > 0)
     {
         string text = adUnits[0];
         for (int i = 1; i < adUnits.Length; i++)
         {
             text = text + "," + adUnits[i];
         }
         MCAdsBinding._plugin.Call("initializeRewardedAdSystem", new object[]
         {
             text
         });
     }
 }
Beispiel #2
0
 public static void SetRewardedVideoParentalGateType(MPRewardedVideoParentalGateType type)
 {
     if (Application.isEditor)
     {
         return;
     }
     MCAdsBinding.LogInfo("SetRewardedVideoParentalGateType() type set to: " + type.ToString());
 }
Beispiel #3
0
 public static string GetDeviceType()
 {
     if (Application.isEditor)
     {
         return("EDITOR");
     }
     MCAdsBinding.LogInfo(MethodBase.GetCurrentMethod().Name);
     return(MCAdsBinding._plugin.Call <string>("getDeviceType", new object[0]));
 }
Beispiel #4
0
 public static string GetAdvertisingId()
 {
     if (Application.isEditor)
     {
         return(string.Empty);
     }
     MCAdsBinding.LogInfo(MethodBase.GetCurrentMethod().Name);
     return(MCAdsBinding._plugin.Call <string>("getGIDA", new object[0]));
 }
Beispiel #5
0
 public static void SetGuestIsPayer(bool isPayer)
 {
     if (Application.isEditor)
     {
         return;
     }
     MCAdsBinding.LogInfo("SetGuestIsPayer() isPayer set to: " + isPayer.ToString());
     MCAdsBinding._plugin.Call("setGuestIsPayer", new object[]
     {
         isPayer
     });
 }
Beispiel #6
0
 public static void SetGuestPreferredLanguage(string languageCode)
 {
     if (Application.isEditor)
     {
         return;
     }
     MCAdsBinding.LogInfo("SetGuestPreferredLanguage() languageCode set to: " + languageCode);
     MCAdsBinding._plugin.Call("setGuestPreferredLanguage", new object[]
     {
         languageCode
     });
 }
Beispiel #7
0
 public static void SetGuestAge(int age)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (age < 0)
     {
         MCAdsBinding.LogWarning("SetGuestAge() called with negative age: " + age.ToString());
     }
     else
     {
         MCAdsBinding.LogInfo("SetGuestAge() age set to: " + age.ToString());
     }
     MCAdsBinding._plugin.Call("setGuestAge", new object[]
     {
         age
     });
 }