public static void SetPlacementAlignmentWithOffset(string placementName, BannerAlignment bannerAlignment, int x, int y) { Log("SetPlacementAlignmentWithOffset placementName:" + placementName + " bannerAlignment: " + bannerAlignment + " x: " + x + " y:" + y); if (Application.platform == RuntimePlatform.Android && _plugin != null) { _plugin.Call("aatkitSetPlacementAlignmentWithOffset", placementName, (int)bannerAlignment, x, y); } }
public static void SetMultiSizeAlignment(string placementName, BannerAlignment multiSizeAlignment) { Log("SetMultiSizeAlignment placementName:" + placementName + " multiSizeAlignment: " + multiSizeAlignment); if (Application.platform == RuntimePlatform.Android && _plugin != null) { _plugin.Call("aatkitSetMultiSizeAlignment", placementName, (int)multiSizeAlignment); } }
public static void SetPlacementAlignment(string placementName, BannerAlignment bannerAlignment) { Log("SetPlacementAlignment placementName:" + placementName + " bannerAlignment: " + bannerAlignment); if (Application.platform == RuntimePlatform.Android && _plugin != null) { _plugin.Call("aatkitSetPlacementAlignment", placementName, (int)bannerAlignment); } if (Application.isEditor && AATKitPlaceholderManager.Instance != null) { AATKitPlaceholderManager.Instance.SetPlacementAlignment(placementName, bannerAlignment); } }
// Creates a banner with the given ad unit and size placed based on the position parameter public static void createBanner(string adUnitId, BannerAlignment alignment, int width, int height) { #if UNITY_ANDROID if (_plugin == null) { using (AndroidJavaClass pluginClass = new AndroidJavaClass("com.mobfox.unityplugin.MobFoxUnityPlugin")) { _plugin = pluginClass.CallStatic <AndroidJavaObject> ("instance"); } } _plugin.Call("createBanner", adUnitId, (int)alignment, width, height); #elif UNITY_IOS MobFoxCreateBanner(adUnitId, alignment, width, height); #endif }
// Creates a banner with the given ad unit placed based on the position parameter public static void createBanner(string adUnitId, BannerAlignment alignment) { createBanner(adUnitId, alignment, 320, 50); }
private static extern void MobFoxCreateBanner(string adUnitId, BannerAlignment alignment, int width, int height);