public static void LoadNativeAdvertForAdType(TDNativeAdType nativeType) { #if UNITY_IPHONE _LoadNativeAdvertForAdType(nativeType.ToString()); #elif UNITY_ANDROID CallAndroidStaticMethod("LoadNativeAd", nativeType.ToString()); #endif }
public static void LoadNativeAdvertForTag(string tag, TDNativeAdType nativeType) { #if UNITY_IPHONE _LoadNativeAdvertForPlacementTag(tag, nativeType.ToString()); #elif UNITY_ANDROID CallAndroidStaticMethod("LoadNativeAd", nativeType.ToString(), tag); #endif }
public static TDNativeAd GetNativeAd(TDNativeAdType adType, string tag) { var nativeAdJson = "{}"; #if UNITY_IPHONE nativeAdJson = Marshal.PtrToStringAnsi(_GetNativeAdWithTag(tag, adType.ToString())); #elif UNITY_ANDROID nativeAdJson = GetAndroidStatic <string>("GetNativeAdWithTag", adType.ToString(), tag); #else return(null); #endif return(TDNativeAd.CreateNativeAd(nativeAdJson)); }
public static TDAdType GetAdTypeFromNativeType(TDNativeAdType nativeType) { var nativeString = nativeType.ToString(); var typeString = nativeString.Replace("TDNativeAdType", "TDAdType"); return(GetEnumFromString <TDAdType>(typeString)); }
public static bool IsNativeAdReady(TDNativeAdType adType, string tag) { bool ready = false; #if UNITY_ANDROID ready = GetAndroidStatic <bool>("IsNativeAdReady", adType.ToString(), tag); #endif return(ready); }