Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Logystone

Member
  • Content Count

    39
  • Joined

  • Last visited

  • Days Won

    1

Logystone last won the day on April 3

Logystone had the most liked content!

Community Reputation

2 Neutral

About Logystone

  • Rank
    Member
  • Birthday 07/21/2000

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello everyone, I'm creating my first AR game, similar to Amazon AR, Which one should i use vuforia or ARCore && Arkit ? If ARCore && ARKit , should i download the sdks or get them from package manger ? or no differences between them ? Thanks alot!
  2. Last update : Multiple game modes(Easy, Hard, Extreme)! Random shapes change can now be removed! Smooth play Events Less ads
  3. Hi @KingdomStudios, I would like to work as freelancer if there is any c# job position!
  4. Shapes IO Is about to catch shapes and collect them in the carrier, carrier contains (cube,Circle,cone up and down). So you have to make sure the enemy shape and the carrier shape are the same to get up to score, by clicking on the carrier to change shape type, there are also abilities that helps you in the game like double coins, double gems, life and decrease the enemy speed by x1.5! Features : -How-To-Play built in. -Free To Play! -Easy to play -Customizable design , (Fonts, Templates, Shapes, Carriers) -Play to earn money! -Earned money can be withdrawn to PayPal, Gift-Cards. -Suitable for Gamers who want to purchase in-game currencies or in-game items -Secured transfers. Requirements : -Network availability during the play. ------------------------------------- Shapes IO+ on Google Play ------------------------------------- Guys this is my 2nd game and I'm to proud that I've released it with Unity3D Game engine You may face bugs in the game please comment the bugs to be fixed! ------------------------------------------------------------------- Event :
  5. Hello everyone, My question is can "SystemInfo.deviceUniqueIdentifier" get a unique id for Android devices ? https://docs.unity3d.com/560/Documentation/ScriptReference/SystemInfo-deviceUniqueIdentifier.html
  6. Hello everyone, I think most of you guys who develop android games faced errors with canvas scaling with screen sizes, Like UI elements sometimes out of screen Well, First of all i tried to set a fixed resolution to all screen devices, but some devices uses more memory that it's expected to use which cause a lot of lags, Screen.SetResolution(1080, 2160, true); After a hard work of research i made this script : using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CanvasTest : MonoBehaviour { public CanvasScaler canvas; void Start() { canvas.referenceResolution.Set(Screen.width, Screen.height); } } The resolution the UI layout is designed for. If the screen resolution is larger, the UI will be scaled up, and if it’s smaller, the UI will be scaled down. i tested it on 4 devices with different screen resolutions and it worked, ------ Tips : -Create a new GameObject in Hierarchy . -Name it what ever you want. -Create a new script like : "CanvasManager." -Drag the code above in the script -put the script in the GameObject -Drag CanvasScaler to the GameObject which contains the script -Make sure the CanvasScaler : 1] UI Scale Mode : Scale with screen size 2] Reference Resolution : as you want but what i tested it was on (1440x2880) 3] Screen Match Mode : Match Width Or Height and make sure it's set to : 1 (width(0)------------(0.5)-----------Height(1)) ------------ It wont work in the Editor(elements collide with each other), test it on android device and it will work fine ------------ if anyone have better than this please post it here Thank you so much!
  7. Hello everyone, banner & interstitial ads are not showing but rewarded video is showing without giving rewards. This is my AdManager.cs and this is Mini view of Game Handle script and this is what i get when i click like something "Settings" to show banner & interstitial ads :
  8. I just need to know if the problem was from me or from Google dumbass not updated AI ?!?!?!?!?
  9. Hello everyone, My game has been suspended from Google for Violation User Ratings, Reviews, and Installs policy, Because my rating system works when the player reach score 10 or more i ask them to rate it, they can rate now, later and never rate without giving them for example coins... This is my script : using System.Collections; using System.Collections.Generic; using UnityEngine; public class RateManager : MonoBehaviour { public AudioClip ButtonPress; public AudioSource SFX; public GameObject RateOBJ; private protected int currRateLater; private protected void Start() { if (!PlayerPrefs.HasKey("Rated") && !PlayerPrefs.HasKey("RateLater") &&!PlayerPrefs.HasKey("NeverRate")) { PlayerPrefs.SetBool("Rated",false); PlayerPrefs.SetInt("RateLater", 0); PlayerPrefs.SetBool("NeverRate",false); } currRateLater = PlayerPrefs.GetInt("RateLater"); if (PlayerPrefs.GetBool("Rated") == false) { if (PlayerPrefs.GetBool("NeverRate") == false) { if (PlayerPrefs.GetInt("Score") > 10) { if (PlayerPrefs.GetInt("RateLater") == 0) { RateOBJ.SetActive(true); } else { if (PlayerPrefs.GetInt("RateLater") == 1) { if (PlayerPrefs.GetInt("Score") > 20) { RateOBJ.SetActive(true); } } if (PlayerPrefs.GetInt("RateLater") == 2) { if (PlayerPrefs.GetInt("Score") > 30) { RateOBJ.SetActive(true); } } if (PlayerPrefs.GetInt("RateLater") == 3) { if (PlayerPrefs.GetInt("Score") > 40) { RateOBJ.SetActive(true); } } if (PlayerPrefs.GetInt("RateLater") == 4) { if (PlayerPrefs.GetInt("Score") > 50) { RateOBJ.SetActive(true); } } if (PlayerPrefs.GetInt("RateLater") == 5) { if (PlayerPrefs.GetInt("Score") > 60) { RateOBJ.SetActive(true); } } } } } } } public void Rate() { this.gameObject.GetComponent<AudioSource>(); this.GetComponent<AudioSource>().clip = ButtonPress; this.GetComponent<AudioSource>().Play(); #if UNITY_ANDROID if (GameObject.Find("Manager").GetComponent<NetworkAvailability>().Available == true) { Application.OpenURL("market://details?id=com.******"); PlayerPrefs.SetBool("Rated", true); RateOBJ.SetActive(false); } #elif UNITY_IPHONE Application.OpenURL("itms-apps://itunes.apple.com/app/idYOUR_APP_ID"); #endif } public void RateLater() { this.gameObject.GetComponent<AudioSource>(); this.GetComponent<AudioSource>().clip = ButtonPress; this.GetComponent<AudioSource>().Play(); currRateLater += 1; PlayerPrefs.SetInt("RateLater", currRateLater); RateOBJ.SetActive(false); } public void Never() { this.gameObject.GetComponent<AudioSource>(); this.GetComponent<AudioSource>().clip = ButtonPress; this.GetComponent<AudioSource>().Play(); PlayerPrefs.SetBool("NeverRate", true); RateOBJ.SetActive(false); } } I've read this section : https://play.google.com/about/storelisting-promotional/ratings-reviews-installs/
  10. Thank you so much, Maybe I've a topic Introducing myself. anyway I'm 18 Years old and it's my 2nd game and its my first year in my university. Some of android bugs does not comes from the developers who develop games, it comes with the developers who make plugins like when you download GooglePlayGames plugin and Admob there's much bugs comes in.
  11. Logystone

    Android SDK

    Hello everyone. My unity version is 2018.3.6f1 what android-sdk version and platform tools & platforms should i have to run latest admob and googleplayservice?
  12. failed getting available android api levels make sure you android sdk tools version is 25 or higher and have internet connection. how can i make sure and know that my sdk tools version is 25 or higher? and my another question that my ads are not showing is that error from this error?(admob) Ads not showing ?
  13. The ads are not showing... this is the scripts : My main script : AdManager using System.Collections; using System.Collections.Generic; using UnityEngine; using admob; public class AdManager : MonoBehaviour { string appID = ""; string bannerID_1 = ""; string bannerID_2 = ""; string interstitialID_1 = ""; string interstitialID_2 = ""; string interstitialID_3 = ""; string videoID_1 = ""; string videoID_2 = ""; string videoID_3 = ""; public static AdManager Instance { set; get; } private void Start() { Instance = this; DontDestroyOnLoad(gameObject); // ad = Admob.Instance(); // ad.interstitialEventHandler += onInterstitialEvent; // ad.rewardedVideoEventHandler += onRewardedVideoEvent; // ad.initSDK(appID, adProperties);//reqired,adProperties can been null Admob.Instance().rewardedVideoEventHandler += onRewardedVideoEvent; #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID initAdmob(); Admob.Instance().loadInterstitial(interstitialID_1); Admob.Instance().loadInterstitial(interstitialID_2); Admob.Instance().loadInterstitial(interstitialID_3); Admob.Instance().loadRewardedVideo(videoID_1); Admob.Instance().loadRewardedVideo(videoID_2); Admob.Instance().loadRewardedVideo(videoID_3); #endif } void onRewardedVideoEvent(string eventName, string msg) { Debug.Log("handler onRewardedVideoEvent---" + eventName + " rewarded: " + msg); } void initAdmob() { #if UNITY_ANDROID appID = "ca-app-pub-xx"; bannerID_1 = "ca-app-pub-xx"; bannerID_2 = "ca-app-pub-xx"; interstitialID_1 = "ca-app-pub-xx"; interstitialID_2 = "ca-app-pub-xx"; interstitialID_3 = "ca-app-pub-xx"; videoID_1 = "ca-app-pub-xx"; videoID_2 = "ca-app-pub-xx"; videoID_3 = "ca-app-pub-xx"; #endif } public void ShowBannaerAdSettings() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID Admob.Instance().showBannerRelative(bannerID_1, AdSize.SMART_BANNER, AdPosition.BOTTOM_CENTER); #endif } public void ShowBannaerAdStore() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID Admob.Instance().showBannerRelative(bannerID_2, AdSize.SMART_BANNER, AdPosition.BOTTOM_CENTER); #endif } public void HideBannerAdSettings() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID Admob.Instance().removeBanner(); #endif } public void ShowInterstitialPlay() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID if (Admob.Instance().isInterstitialReady()) { Admob.Instance().showInterstitial(); } else { Admob.Instance().loadInterstitial(interstitialID_1); Admob.Instance().loadInterstitial(interstitialID_2); Admob.Instance().loadInterstitial(interstitialID_3); } #endif } public void ShowInterstitialStore() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID if (Admob.Instance().isInterstitialReady()) { Admob.Instance().showInterstitial(); } else { Admob.Instance().loadInterstitial(interstitialID_1); Admob.Instance().loadInterstitial(interstitialID_2); Admob.Instance().loadInterstitial(interstitialID_3); } #endif } public void ShowInterstitialSettings() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID if (Admob.Instance().isInterstitialReady()) { Admob.Instance().showInterstitial(); } else { Admob.Instance().loadInterstitial(interstitialID_1); Admob.Instance().loadInterstitial(interstitialID_2); Admob.Instance().loadInterstitial(interstitialID_3); } #endif } //TheGame public void ShowInterstitialHome() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID if (Admob.Instance().isInterstitialReady()) { Admob.Instance().showInterstitial(); } else { Admob.Instance().loadInterstitial(interstitialID_1); Admob.Instance().loadInterstitial(interstitialID_2); Admob.Instance().loadInterstitial(interstitialID_3); } #endif } public void ShowInterstitialReplay() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID if (Admob.Instance().isInterstitialReady()) { Admob.Instance().showInterstitial(); } else { Admob.Instance().loadInterstitial(interstitialID_1); Admob.Instance().loadInterstitial(interstitialID_2); Admob.Instance().loadInterstitial(interstitialID_3); } #endif } public void ShowRewradedVideo() { #if UNITY_EDITOR Debug.Log("Unable to play ads from the editor"); #elif UNITY_ANDROID if (Admob.Instance().isRewardedVideoReady()) { Admob.Instance().showRewardedVideo(); } else { Admob.Instance().loadRewardedVideo(videoID_1); Admob.Instance().loadRewardedVideo(videoID_2); Admob.Instance().loadRewardedVideo(videoID_3); } #endif } } using UnityEngine; using admob; public class admobdemo : MonoBehaviour { Admob ad; string appID=""; string bannerID=""; string interstitialID=""; string videoID=""; string nativeBannerID = ""; void Start () { Debug.Log("start unity demo-------------"); initAdmob(); } void Update () { if (Input.GetKeyUp (KeyCode.Escape)) { Debug.Log(KeyCode.Escape+"-----------------"); } } void initAdmob() { #if UNITY_IOS appID="ca-app-pub-3940256099942544~1458002511"; bannerID="ca-app-pub-3940256099942544/2934735716"; interstitialID="ca-app-pub-3940256099942544/4411468910"; videoID="ca-app-pub-3940256099942544/1712485313"; nativeBannerID = "ca-app-pub-3940256099942544/3986624511"; #elif UNITY_ANDROID appID="ca-app-pub-3940256099942544~3347511713"; bannerID="ca-app-pub-3940256099942544/6300978111"; interstitialID="ca-app-pub-3940256099942544/1033173712"; videoID="ca-app-pub-3940256099942544/5224354917"; nativeBannerID = "ca-app-pub-3940256099942544/2247696110"; #endif AdProperties adProperties = new AdProperties(); adProperties.isTesting = true; ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initSDK(appID,adProperties);//reqired,adProperties can been null } void OnGUI(){ if (GUI.Button(new Rect(120, 0, 100, 60), "showInterstitial")) { Debug.Log("touch inst button -------------"); if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(interstitialID); } } if (GUI.Button(new Rect(240, 0, 100, 60), "showRewardVideo")) { Debug.Log("touch video button -------------"); if (ad.isRewardedVideoReady()) { ad.showRewardedVideo(); } else { ad.loadRewardedVideo(videoID); } } if (GUI.Button(new Rect(0, 100, 100, 60), "showbanner")) { Admob.Instance().showBannerRelative(bannerID,AdSize.SMART_BANNER, AdPosition.BOTTOM_CENTER); } if (GUI.Button(new Rect(120, 100, 100, 60), "showbannerABS")) { Admob.Instance().showBannerAbsolute(bannerID,AdSize.BANNER, 20, 220,"mybanner"); } if (GUI.Button(new Rect(240, 100, 100, 60), "removebanner")) { Admob.Instance().removeBanner(); Admob.Instance().removeBanner("mybanner"); } if (GUI.Button(new Rect(0, 200, 100, 60), "showNative")) { Admob.Instance().showNativeBannerRelative(nativeBannerID,new AdSize(320,280), AdPosition.BOTTOM_CENTER); } if (GUI.Button(new Rect(120, 200, 100, 60), "showNativeABS")) { Admob.Instance().showNativeBannerAbsolute(nativeBannerID,new AdSize(-1,132), 0, 300); } if (GUI.Button(new Rect(240, 200, 100, 60), "removeNative")) { Admob.Instance().removeNativeBanner(); } } void onInterstitialEvent(string eventName, string msg) { Debug.Log("handler onAdmobEvent---" + eventName + " " + msg); if (eventName == AdmobEvent.onAdLoaded) { Admob.Instance().showInterstitial(); } } void onBannerEvent(string eventName, string msg) { Debug.Log("handler onAdmobBannerEvent---" + eventName + " " + msg); } void onRewardedVideoEvent(string eventName, string msg) { Debug.Log("handler onRewardedVideoEvent---" + eventName + " rewarded: " + msg); } void onNativeBannerEvent(string eventName, string msg) { Debug.Log("handler onAdmobNativeBannerEvent---" + eventName + " " + msg); } } using UnityEngine; using System.Runtime.InteropServices; using AOT; namespace admob { public class Admob { public delegate void AdmobEventHandler(string eventName, string msg); public event AdmobEventHandler bannerEventHandler; public event AdmobEventHandler interstitialEventHandler; public event AdmobEventHandler rewardedVideoEventHandler; public event AdmobEventHandler nativeBannerEventHandler; private static Admob _instance; public static Admob Instance() { if (_instance == null) { _instance = new Admob(); _instance.preInitAdmob(); } return _instance; } #if UNITY_IOS internal delegate void AdmobAdCallBack(string adtype, string eventName, string msg); public void removeAllBanner(){ Debug.Log("calling removeAllBanner"); } private void preInitAdmob() { } [DllImport("__Internal")] private static extern void _kminitSDK(string appid,string adproperties, AdmobAdCallBack callback); public void initSDK(string appid,AdProperties value) { if(value==null){ value = new AdProperties(); } string properties=value.toString(); _kminitSDK(appid,properties,onAdmobEventCallBack); } [DllImport("__Internal")] private static extern void _kmshowNativeBannerAbsolute(string nativeID, int width, int height, int x, int y,string instanceName); public void showNativeBannerAbsolute(string nativeID,AdSize size, int x, int y, string instanceName = "defaultNativeBanner") { _kmshowNativeBannerAbsolute(nativeID,size.Width, size.Height, x, y, instanceName); } [DllImport("__Internal")] private static extern void _kmshowNativeBannerRelative(string nativeID, int width, int height, int position, int marginY, string instanceName); public void showNativeBannerRelative(string nativeID,AdSize size, int position, int marginY=0, string instanceName = "defaultNativeBanner") { _kmshowNativeBannerRelative(nativeID,size.Width, size.Height, position, marginY, instanceName); } [DllImport("__Internal")] private static extern void _kmremoveNativeBanner(string instanceName); public void removeNativeBanner(string instanceName = "defaultNativeBanner") { _kmremoveNativeBanner(instanceName); } [DllImport("__Internal")] private static extern void _kmreloadNativeBannerAds(string instanceName); public void reloadNativeBanner(string instanceName = "defaultNativeBanner") { _kmreloadNativeBannerAds(instanceName); } [DllImport("__Internal")] private static extern void _kmshowBannerAbsolute(string bannerid,int width, int height, int x, int y,string instanceName); public void showBannerAbsolute(string bannerid,AdSize size, int x, int y,string instanceName="defaultBanner") { _kmshowBannerAbsolute(bannerid,size.Width, size.Height, x, y,instanceName); } [DllImport("__Internal")] private static extern void _kmshowBannerRelative(string bannerid,int width, int height, int position, int marginY,string instanceName); public void showBannerRelative(string bannerid,AdSize size, int position, int marginY=0,string instanceName="defaultBanner") { _kmshowBannerRelative(bannerid,size.Width, size.Height, position, marginY,instanceName); } [DllImport("__Internal")] private static extern void _kmremoveBanner(string instanceName); public void removeBanner(string instanceName="defaultBanner") { _kmremoveBanner(instanceName); } [DllImport("__Internal")] private static extern void _kmloadInterstitial(string id); public void loadInterstitial(string interstitialID) { _kmloadInterstitial(interstitialID); } [DllImport("__Internal")] private static extern bool _kmisInterstitialReady(); public bool isInterstitialReady() { return _kmisInterstitialReady(); } [DllImport("__Internal")] private static extern void _kmshowInterstitial(); public void showInterstitial() { _kmshowInterstitial(); } [DllImport("__Internal")] private static extern void _kmloadRewardedVideo(string rewardedVideoID); public void loadRewardedVideo(string rewardedVideoID) { _kmloadRewardedVideo(rewardedVideoID); } [DllImport("__Internal")] private static extern bool _kmisRewardedVideoReady(); public bool isRewardedVideoReady() { return _kmisRewardedVideoReady(); } [DllImport("__Internal")] private static extern void _kmshowRewardedVideo(); public void showRewardedVideo() { _kmshowRewardedVideo(); } [MonoPInvokeCallback(typeof(AdmobAdCallBack))] public static void onAdmobEventCallBack(string adtype, string eventName, string msg) { // Debug.Log("c# receive callback " + adtype + " " + eventName + " " + msg); if (adtype == "banner") { if (Admob.Instance().bannerEventHandler != null) Admob.Instance().bannerEventHandler(eventName, msg); } else if (adtype == "interstitial") { if (Admob.Instance().interstitialEventHandler != null) Admob.Instance().interstitialEventHandler(eventName, msg); } else if (adtype == "rewardedVideo") { if (Admob.Instance().rewardedVideoEventHandler != null) Admob.Instance().rewardedVideoEventHandler(eventName, msg); } else if (adtype == "nativeBanner") { if (Admob.Instance().nativeBannerEventHandler != null) Admob.Instance().nativeBannerEventHandler(eventName, msg); } } #elif UNITY_ANDROID private AndroidJavaObject jadmob; private void preInitAdmob(){ if (jadmob == null) { AndroidJavaClass admobUnityPluginClass = new AndroidJavaClass("com.admob.plugin.AdmobUnityPlugin"); jadmob = admobUnityPluginClass.CallStatic<AndroidJavaObject>("getInstance"); InnerAdmobListener innerlistener = new InnerAdmobListener(); innerlistener.admobInstance = this; jadmob.Call("setListener", new object[] {new AdmobListenerProxy(innerlistener) }); } } public void removeAllBanner(){ jadmob.Call("removeAllBanner"); } public void initSDK(string appid,AdProperties value) { if(value==null){ value = new AdProperties(); } jadmob.Call ("initSDK", new object[]{appid,value.toString()}); } public void showBannerRelative(string admobBannerID,AdSize size, int position,int marginY=0,string instanceName="defaultBanner") { jadmob.Call("showBannerRelative", new object[] {admobBannerID, size.Width,size.Height,position,marginY,instanceName}); } public void showBannerAbsolute(string admobBannerID,AdSize size, int x, int y, string instanceName = "defaultBanner") { jadmob.Call("showBannerAbsolute", new object[] {admobBannerID, size.Width, size.Height,x,y ,instanceName}); } public void removeBanner(string instanceName = "defaultBanner") { jadmob.Call("removeBanner",instanceName); } public void loadInterstitial(string interstitialID) { jadmob.Call("loadInterstitial",interstitialID); } public bool isInterstitialReady() { bool isReady = jadmob.Call<bool>("isInterstitialReady"); return isReady; } public void showInterstitial() { jadmob.Call("showInterstitial"); } public void loadRewardedVideo(string rewardedVideoID) { jadmob.Call("loadRewardedVideo", new object[] { rewardedVideoID }); } public bool isRewardedVideoReady() { bool isReady = jadmob.Call<bool>("isRewardedVideoReady"); return isReady; } public void showRewardedVideo() { jadmob.Call("showRewardedVideo"); } /* public void setAdProperties(AdProperties value) { jadmob.Call("setAdProperties",value.toString()); } */ public void showNativeBannerRelative(string nativeBannerID, AdSize size, int position, int marginY=0,string instanceName = "defaultNativeBanner") { jadmob.Call("showNativeBannerRelative", new object[] { nativeBannerID,size.Width, size.Height, position, marginY, instanceName }); } public void showNativeBannerAbsolute(string nativeBannerID,AdSize size, int x, int y, string instanceName = "defaultNativeBanner") { jadmob.Call("showNativeBannerAbsolute", new object[] {nativeBannerID, size.Width, size.Height, x, y, instanceName }); } public void removeNativeBanner(string instanceName = "defaultNativeBanner") { jadmob.Call("removeNativeBanner", instanceName); } public void reloadNativeBanner(string instanceName = "defaultNativeBanner") { jadmob.Call("reloadNativeBanner", instanceName); } class InnerAdmobListener : IAdmobListener { internal Admob admobInstance; public void onAdmobEvent(string adtype, string eventName, string paramString) { if (adtype == "banner") { if (admobInstance.bannerEventHandler != null) admobInstance.bannerEventHandler(eventName, paramString); } else if (adtype == "interstitial") { if (admobInstance.interstitialEventHandler != null) admobInstance.interstitialEventHandler(eventName, paramString); } else if (adtype == "rewardedVideo") { if (admobInstance.rewardedVideoEventHandler != null) admobInstance.rewardedVideoEventHandler(eventName, paramString); } else if (adtype == "nativeBanner") { if(admobInstance.nativeBannerEventHandler!=null) admobInstance.nativeBannerEventHandler(eventName, paramString); } } } #else public void removeAllBanner() { Debug.Log("calling removeAllBanner"); } private void preInitAdmob() { } public void initSDK(string appid,AdProperties adProperties) { Debug.Log("calling init sdk"); Debug.Log("bannerEventHandler==null ? " + (bannerEventHandler == null)); Debug.Log("interstitialEventHandler==null ? " + (interstitialEventHandler == null)); Debug.Log("rewardedVideoEventHandler==null ? " + (rewardedVideoEventHandler == null)); Debug.Log("nativeBannerEventHandler==null ? " + (nativeBannerEventHandler == null)); } public void showBannerAbsolute(string bannerID,AdSize size, int x, int y, string instanceName = "defaultBanner") { Debug.Log("calling showBannerAbsolute"); } public void showBannerRelative(string bannerID,AdSize size, int position, int marginY=0, string instanceName = "defaultBanner") { Debug.Log("calling showBannerRelative"); } public void removeBanner(string instanceName = "defaultBanner") { Debug.Log("calling removeBanner"); } public void loadInterstitial(string interstitialID) { Debug.Log("calling loadInterstitial"); } public bool isInterstitialReady() { Debug.Log("calling isInterstitialReady"); return false; } public void showInterstitial() { Debug.Log("calling showInterstitial"); } public void loadRewardedVideo(string rewardedVideoID) { Debug.Log("calling loadRewardedVideo"); } public bool isRewardedVideoReady() { Debug.Log("calling isRewardedVideoReady"); return false; } public void showRewardedVideo() { Debug.Log("calling showRewardedVideo"); } //public void setAdProperties(AdProperties value) { } public void showNativeBannerRelative(string nativeBannerID, AdSize size, int position, int marginY=0,string instanceName = "defaultNativeBanner") { Debug.Log("calling showNativeBannerRelative"); } public void showNativeBannerAbsolute(string nativeBannerID, AdSize size, int x, int y, string instanceName = "defaultNativeBanner") { Debug.Log("calling showNativeBannerAbsolute"); } public void removeNativeBanner(string instanceName = "defaultNativeBanner") { Debug.Log("calling removeNativeBanner"); } public void reloadNativeBanner(string instanceName="defaultNativeBanner"){ } #endif } }
  14. NullReferenceException: Object reference not set to an instance of an object admob.Admob.preInitAdmob () (at Assets/Plugins/AdmobAPI/Admob.cs:171) admob.Admob.Instance () (at Assets/Plugins/AdmobAPI/Admob.cs:22) ------------- Unity 2018.3.6f1 Admob plugin : https://github.com/unity-plugins/Unity-Admob .....but i removed the libs because i've google play services and it wont work if i didn't the libs. Android sdk build tool 28.0.3 Android sdk platforms android-25 & android-26 Android sdk version -> i don't know , Already seen this issue but didn't know what plugin he is talking about : https://github.com/unity-plugins/Unity-Admob/issues/113
×
×
  • Create New...