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

    38
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Logystone

  1. Last update : Multiple game modes(Easy, Hard, Extreme)! Random shapes change can now be removed! Smooth play Events Less ads
  2. Hi @KingdomStudios, I would like to work as freelancer if there is any c# job position!
  3. 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 :
  4. 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
  5. 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!
  6. 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 :
  7. I just need to know if the problem was from me or from Google dumbass not updated AI ?!?!?!?!?
  8. 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/
  9. 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.
  10. 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?
  11. 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 ?
  12. 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 } }
  13. 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
  14. Logystone

    Shapes IO

    Hello guys, this is brand new type of game it's not that good, it's just only my 2nd game and i'm not that professional . 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! forget guys about the design it's just beta design not the release one. and the game play is not completed yet there's some errors. Catch these photos : We are not done YET! The new feature let the players earn money like the developers earn money! for each score you get we give you money depends on what level you are in, and here is the rates: Score (1-10) Players earn $0.001 Score (10-20) Players earn $0.005 Score (20-30) Players earn $0.01 Score (30-40) Players earn $0.02 Score (40-50) Players earn $0.03 Score (50-75) Players earn $0.04 Score (75 and u p) Players earn $0.06 ----- Money also can be earned from another things like exchanging gems to $$, watch videos and rate the game! For now money can be withdrawn through PayPal , in soon future i may add Gift Cards, stripe... etc Feedback & critics Accepted!
  15. Logystone

    Unity C# admob

    Thank you so much
  16. Logystone

    Gradle Error

    Hello everyone, today i wanted to test google play services and admob and i downloaded this plugin : https://github.com/unity-plugins/google-play-game-service-for-unity3d once i tried to build it i get this error : and in the console : CommandInvokationFailure: Gradle build failed. C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease" stderr[ C:\Users\Dyche\Documents\Shapes IO\Temp\gradleOut\src\main\AndroidManifest.xml:28:13-35 Error: Attribute meta-data#android.support.VERSION@value value=(26.0.0) from [:appcompat-v7-26.0.0:] AndroidManifest.xml:28:13-35 is also present at [:com.android.support.support-compat-26.1.0:] AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processReleaseManifest'. > Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0) from [:appcompat-v7-26.0.0:] AndroidManifest.xml:28:13-35 is also present at [:com.android.support.support-compat-26.1.0:] AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 36s ] stdout[ :preBuild UP-TO-DATE :unity-android-resources:preBuild UP-TO-DATE :unity-android-resources:preReleaseBuild UP-TO-DATE :unity-android-resources:checkReleaseManifest :unity-android-resources:processReleaseManifest :preReleaseBuild :unity-android-resources:compileReleaseAidl :compileReleaseAidl :unity-android-resources:packageReleaseRenderscript NO-SOURCE :compileReleaseRenderscript :checkReleaseManifest :generateReleaseBuildConfig :prepareLintJar :generateReleaseResValues :generateReleaseResources :unity-android-resources:compileReleaseRenderscript :unity-android-resources:generateReleaseResValues :unity-android-resources:generateReleaseResources :unity-android-resources:packageReleaseResources :mergeReleaseResources :createReleaseCompatibleScreenManifests :processReleaseManifest See http://g.co/androidstudio/manifest-merger for more information about the manifest merger. :processReleaseManifest FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings 16 actionable tasks: 16 executed ] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <e1c3953b4cf040ddb1400046b1c34897>:0) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
  17. Logystone

    Unity C# admob

    Hello everyone, using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using CodeStage.AntiCheat.ObscuredTypes; using admob; public class Admob_Game : MonoBehaviour { Admob ad; ObscuredString appID = ""; ObscuredString interstitialID_1 = ""; ObscuredString interstitialID_2 = ""; ObscuredString interstitialID_3 = ""; ObscuredString videoID_1 = ""; ObscuredString videoID_2 = ""; ObscuredString videoID_3 = ""; void Start() { initAdmob(); ad.loadInterstitial(interstitialID_1); ad.loadInterstitial(interstitialID_2); ad.loadInterstitial(interstitialID_3); ad.loadRewardedVideo(videoID_1); ad.loadRewardedVideo(videoID_1); ad.loadRewardedVideo(videoID_1); } void initAdmob() { #if UNITY_IOS appID="xx"; bannerID="xx"; interstitialID="xx"; videoID="xx"; nativeBannerID = "xx"; #elif UNITY_ANDROID appID = ""; interstitialID_1 = "xx"; interstitialID_2 = "xx"; interstitialID_3 = "xx"; videoID_1 = "xx"; videoID_2 = "xx"; videoID_3 = "xx"; #endif AdProperties adProperties = new AdProperties(); adProperties.isTesting = true; ad = Admob.Instance(); ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.initSDK(appID, adProperties);//reqired,adProperties can been null } void onInterstitialEvent(string eventName, string msg) { Debug.Log("handler onAdmobEvent---" + eventName + " " + msg); if (eventName == AdmobEvent.onAdLoaded) { Admob.Instance().showInterstitial(); } } void onRewardedVideoEvent(string eventName, string msg) { Debug.Log("handler onRewardedVideoEvent---" + eventName + " rewarded: " + msg); } public void ShowInterstitialHome() { if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(interstitialID_1); ad.loadInterstitial(interstitialID_2); ad.loadInterstitial(interstitialID_3); } } public void ShowInterstitialReplay() { if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(interstitialID_1); ad.loadInterstitial(interstitialID_2); ad.loadInterstitial(interstitialID_3); } } public void ShowRewardedVideo() { if (ad.isRewardedVideoReady()) { ad.showRewardedVideo(); } else { ad.loadRewardedVideo(videoID_1); ad.loadRewardedVideo(videoID_1); ad.loadRewardedVideo(videoID_1); } } } In this script how do i know if the rewarded video has been watched so i can give my player reward ? and how to know if interstitial banner has been showed ? Thank you guys
  18. Logystone

    Email send c#

    Thank you so much guys!
  19. Logystone

    Email send c#

    Hello everyone, This script i have found it from @geckoo, Thank you very much using UnityEngine; using System.Collections; using System; using System.Net; using System.Net.Mail; using System.Net.Security; using System.Security.Cryptography.X509Certificates; public class MailMe : MonoBehaviour { void Start() { // corpus MailMessage mail = new MailMessage(); mail.From = new MailAddress("jojo@gmail.com"); // sender mail.To.Add("jojo@gmail.com"); // receiver mail.Subject = "Hello"; // header mail.Body = "it is just another boring saturday night :)"; // your message SmtpClient smtpServer = new SmtpClient("smtp.gmail.com"); // gmail SMTP smtpServer.Port = 587; // used port for gmail SMTP with SSL // your valid account informations smtpServer.Credentials = new System.Net.NetworkCredential("jojo@gmail.com", "password") as ICredentialsByHost; smtpServer.EnableSsl = true; // SSL option // check relation between sender and SMTP ServicePointManager.ServerCertificateValidationCallback = delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; }; // send mail smtpServer.Send(mail); Debug.Log("success"); // done } } I have 2 questions : does it works on android too ? How can i know if the email has been sent or no? like if(....)
  20. Thank you bro , Honestly i totally agree with you but just want to ask this question... even i can't see myself working on another game engine.
  21. Hello everyone. My name is Mohammad Nazzal i'm 18 Years old and have 3 years experience of Unity3D Engine. however after a week i will start university. Today i met my cousin who studied Software engineering and working in a big company and he knows a lot about the trending games and the engines used in that game, So i asked him "Is Unity3D Game engine worth working on it after the university like a job ?", he said "No" then he told me "tell me about the trending games right now like fortnite , PUBG ..ETC, they are all using Unreal engine" and if you want to get a game development job you should learn Unreal engine instead of Unity3D so you could work in Triple-A Studios .. and honestly i don't know what to do with my unity projects, c# experience ...etc any help,Critics ? guys be serious with the answer and forget the domain "ArmedUnity"
  22. Hello everyone, first of all sorry if i asked too many questions... but there's a few errors left in my 2nd game . I'm working on android game and almost %75 of the game in the Canvas.. I'm working on (1440x2800) screen size and this is my canvas settings : When i play the game on LG G5 The game works perfectly and the enemy speed is correct as i need (100), but when i played it on resolution (720x1280) the enemies on the game didn't even appear because of its speed (100) when i decreased the speed like (100->5) some of the doesn't appear and some of them i can see them as i see them on LG G5 . and honestly my mind is blown (NOTICE : the enemy is in the canvas as image)
  23. Hello everyone this is "ShapeChangeBeta" Script, i want to activate a one GameObject in an array and disable the rest and it works but sometimes when i click the button it activate a GameObject 2-3 times in row means repeating(EXAMPLE : like the cube is active and when i click the button to activate another shape like circle, it activate the same cube....). and i don't want to repeat it. i searched on google and everywhere with no answers! using System.Collections; using System.Collections.Generic; using UnityEngine; public class ShapeChangeBeta : MonoBehaviour { public GameObject[] Shapes; private int currentIndex = 0; void Start() { Shapes[0].SetActive(true); } public void OnButtonClick() { int newIndex = Random.Range(0, Shapes.Length); // Deactivate old gameobject Shapes[currentIndex].SetActive(false); // Activate new gameobject currentIndex = newIndex; Shapes[currentIndex].SetActive(true); } Thank you everyone!
×
×
  • Create New...