private static void initADGCommon() { if (myInstance == null) { GameObject gameObject = new GameObject("ADGForUnity"); DontDestroyOnLoad(gameObject); //Makes the object target not be destroyed automatically when loading a new scene. gameObject.hideFlags = HideFlags.HideAndDontSave; //A combination of not shown in the hierarchy and not saved to to scenes. myInstance = gameObject.AddComponent <ADGUnitySDK3> (); } }
public void InitAd() { Debug.Log("Init"); ADGUnitySDK3.initInterADG(); /* * // iPhoneX対応 * if (Screen.width == 1125 && Screen.height == 2436) { * ADGUnitySDK3.X = ADGUnitySDK3.getNativeWidth() / 2 - 320 * (float)ADGUnitySDK3.Scale / 2; * ADGUnitySDK3.Y = Screen.height/2 - ADGUnitySDK3.getNativeHeight()/2; * ADGUnitySDK3.changeLocationADG(ADGUnitySDK3.X, ADGUnitySDK3.Y); * }*/ }
public static void finishADG() { if (noInstance) { return; } #if UNITY_IPHONE if (Application.platform == RuntimePlatform.IPhonePlayer) { _finishADG(adgni); } #elif UNITY_ANDROID if (Application.platform == RuntimePlatform.Android) { androidPlugin.Call("finishADG"); } #endif Destroy(myInstance); myInstance = null; }
public void FinishAd() { ADGUnitySDK3.finishADG(); }
public void HideAd() { ADGUnitySDK3.dismissInterADG(); }
public void ShowAd() { ADGUnitySDK3.showInterADG(); }
public void LoadAd() { ADGUnitySDK3.loadInterADG(); }