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(); } }
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 <ADGUnitySDK>(); } }
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); } }
// Use this for initialization void Start() { ADGUnitySDK.IOSLocationID = "10723"; ADGUnitySDK.AndroidLocationID = "10724"; ADGUnitySDK.AdType = "SP"; ADGUnitySDK.X = 0; ADGUnitySDK.Y = 0; ADGUnitySDK.Horizontal = "CENTER"; ADGUnitySDK.Vertical = "TOP"; ADGUnitySDK.Width = 0; ADGUnitySDK.Height = 0; ADGUnitySDK.initADG(); }
// Use this for initialization void Start() { ADGUnitySDK.IOSLocationID = "10723"; ADGUnitySDK.AndroidLocationID = "10724"; ADGUnitySDK.AdType = "SP"; ADGUnitySDK.IsIOSEasyPosition = true; ADGUnitySDK.X = 0; ADGUnitySDK.Y = 0; ADGUnitySDK.Horizontal = "CENTER"; ADGUnitySDK.Vertical = "TOP"; ADGUnitySDK.Width = 0; ADGUnitySDK.Height = 0; ADGUnitySDK.IOSInterLocationID = "18031"; ADGUnitySDK.AndroidInterLocationID = "18031"; ADGUnitySDK.BackgroundType = 2; ADGUnitySDK.CloseButtonType = 2; ADGUnitySDK.initADG(); ADGUnitySDK.initInterADG(); }
public void ADGFailedToReceiveAd(string msg) { if (ADGUnitySDK.canCallADG()) { // バナー広告の場合 ADGUnitySDK.loadADG(); // インタースティシャル広告の場合 // ADGUnitySDK.loadInterADG (); } if (ADGUnitySDK2.canCallADG()) { // バナー広告の場合 ADGUnitySDK2.loadADG(); // インタースティシャル広告の場合 // ADGUnitySDK.loadInterADG (); } }
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 static void initADG() { 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 <ADGUnitySDK>(); #if UNITY_IPHONE if (Application.platform == RuntimePlatform.IPhonePlayer) { adgni = _initADG(iosLocationID, adType, x, y, messageObjName, width, height, (float)scale); } #elif UNITY_ANDROID if (Application.platform == RuntimePlatform.Android) { AndroidJavaClass manager = new AndroidJavaClass("com.socdm.d.adgeneration.plugin.unity.ADGNativeManager"); androidPlugin = manager.CallStatic <AndroidJavaObject>("instance"); androidPlugin.Call("initADG", androidLocationID, adType, horizontal, vertical, messageObjName, width, height, (float)scale, margin); } #endif } }
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"); } } }
public static void initADG() { 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<ADGUnitySDK>(); #if UNITY_IPHONE if(Application.platform == RuntimePlatform.IPhonePlayer){ adgni = _initADG(IOS_LOCATIONID , ADTYPE, X , Y , MESSAGEOBJNAME); } #elif UNITY_ANDROID if(Application.platform == RuntimePlatform.Android){ AndroidJavaClass manager = new AndroidJavaClass("com.socdm.d.adgeneration.plugin.unity.ADGNativeManager"); androidPlugin = manager.CallStatic<AndroidJavaObject>("instance"); androidPlugin.Call("initADG", ANDROID_LOCATIONID , ADTYPE , HORIZONTAL , VERTICAL , MESSAGEOBJNAME); } #endif } }
private void OnDestroy() { ADGUnitySDK.finishADG(); ADGUnitySDK2.finishADG(); }
public void FinishAd() { ADGUnitySDK.finishADG(); }
public void HideAd() { ADGUnitySDK.hideADG(); }
public void ShowAd() { ADGUnitySDK.showADG(); }
public void LoadAd() { ADGUnitySDK.loadADG(); }
// Use this for initialization void Start() { ADGUnitySDK.IsEnableTest = false; ADGUnitySDK2.IsEnableTest = false; ADGUnitySDK.initADG(); ADGUnitySDK2.initADG(); //データをリストアする GetSaveData(); //シーンとアイテムの辞書を作る Scene_dic = new Dictionary <int, string>(); Scene_dic.Add(0, "1ConversationScene"); Scene_dic.Add(1, "1BConversationScene"); Scene_dic.Add(2, "3Game Scene"); Scene_dic.Add(3, "1GameOverScene"); Scene_dic.Add(4, "2BConversationScene"); Scene_dic.Add(5, "4GameScene"); Scene_dic.Add(6, "2GameoverScene"); Scene_dic.Add(7, "3BConversationScene"); Scene_dic.Add(8, "6BGameScene"); Scene_dic.Add(9, "3GameoverScene"); Scene_dic.Add(10, "4BConversationScene"); Scene_dic.Add(11, "10BConversationScene"); Scene_dic.Add(12, "6GameScene"); Scene_dic.Add(13, "4GameoverScene"); Scene_dic.Add(14, "5GameoverScene"); Scene_dic.Add(15, "PlusScene"); DontDestroyOnLoad(this); SceneManager.LoadScene("TitleScene"); //Start Scene // SceneManager.LoadScene("1BConversationScene"); // SceneManager.LoadScene("3Game Scene"); // SceneManager.LoadScene("4ConversationScene"); // SceneManager.LoadScene("1GameOverScene"); // SceneManager.LoadScene("2BConversationScene"); // SceneManager.LoadScene("4GameScene"); // SceneManager.LoadScene("2GameoverScene"); // SceneManager.LoadScene("3BConversationScene"); // SceneManager.LoadScene("6BGameScene"); // SceneManager.LoadScene("3GameoverScene"); // SceneManager.LoadScene("4BConversationScene"); // SceneManager.LoadScene( "10ConversationScene"); // SceneManager.LoadScene("6GameScene"); // SceneManager.LoadScene("4GameoverScene"); // SceneManager.LoadScene("5GameoverScene"); // SceneManager.LoadScene("PlusScene"); // Next Scene // SceneManager.LoadScene("2GameScene"); // SceneManager.LoadScene("3ConversationScene"); // SceneManager.LoadScene("2BGameScene"); // SceneManager.LoadScene("5ConversationScene"); // SceneManager.LoadScene("4BGameScene"); // SceneManager.LoadScene("7ConversationScene"); // SceneManager.LoadScene("7BGameScene"); // SceneManager.LoadScene("10ConversationScene"); // SceneManager.LoadScene("3GameoverScene"); // SceneManager.LoadScene("4BConversationScene"); // SceneManager.LoadScene("10ConversationScene"); // SceneManager.LoadScene("9BGameScene"); }
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; }
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<ADGUnitySDK>(); } }