void OnGUI() { if (GUI.Button(new Rect(10, 170, 150, 50), "show")) { ADGUnitySDK.showADG(); } if (GUI.Button(new Rect(170, 170, 150, 50), "hide")) { ADGUnitySDK.hideADG(); } if (GUI.Button(new Rect(10, 270, 150, 50), " Location1")) { ADGUnitySDK.changeLocationADG("LEFT", "BOTTOM"); } if (GUI.Button(new Rect(170, 270, 150, 50), "Location2")) { ADGUnitySDK.changeLocationADG("LEFT", " TOP"); } if (GUI.Button(new Rect(10, 370, 150, 50), "load(Interstitial)")) { ADGUnitySDK.loadInterADG(); } if (GUI.Button(new Rect(170, 370, 150, 50), "show(Interstitial)")) { ADGUnitySDK.showInterADG(); } }
public void InitAd() { //Debug.Log("Init"); ADGUnitySDK.initADG(); // iPhoneX対応 if (Screen.width == 1125 && Screen.height == 2436) { ADGUnitySDK.X = ADGUnitySDK.getNativeWidth() / 2 - 320 * (float)ADGUnitySDK.Scale / 2; ADGUnitySDK.Y = ADGUnitySDK.getNativeHeight() - ADGUnitySDK.Height - 35; ADGUnitySDK.changeLocationADG(ADGUnitySDK.X, ADGUnitySDK.Y); } }
void OnGUI() { if (GUI.Button(new Rect(10, 170, 100, 50), "show")) { ADGUnitySDK.showADG(); } if (GUI.Button(new Rect(120, 170, 100, 50), "hide")) { ADGUnitySDK.hideADG(); } if (GUI.Button(new Rect(10, 270, 100, 50), " Location1")) { if (Application.platform == RuntimePlatform.IPhonePlayer) { ADGUnitySDK.changeLocationADG(0, 350); } else if (Application.platform == RuntimePlatform.Android) { ADGUnitySDK.changeLocationADG("LEFT", "BOTTOM"); } } if (GUI.Button(new Rect(120, 270, 100, 50), "Location2")) { if (Application.platform == RuntimePlatform.IPhonePlayer) { ADGUnitySDK.changeLocationADG(0, 0); } else if (Application.platform == RuntimePlatform.Android) { ADGUnitySDK.changeLocationADG("LEFT", " TOP"); } } }