Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Mobile Menu Starter Kit

Discussion in 'Assets and Asset Store' started by LuxUnity, Jun 13, 2013.

  1. bakiet

    bakiet

    Joined:
    Jun 7, 2015
    Posts:
    11

    Sorry for my ignorance but where in.unity i can sure version and bundle version code is well, for example in my unity i continue version and bundle in player setting in android section, is there you talking about?
     
  2. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  3. bakiet

    bakiet

    Joined:
    Jun 7, 2015
    Posts:
    11
    thanks you lux now is working well
     
  4. bakiet

    bakiet

    Joined:
    Jun 7, 2015
    Posts:
    11
    another question lux when i pay product NO ADS the unityads how disable in menu game kit? what .cs evaluate that, or i have to create code to know if client pay NO ADS?
     
  5. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 2.7.7 is ready in asset store. Now you can have all the stages of a world in the same game scene.
     
  6. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    You have to create in your own code something that said: ads_master.enable_ads = false;
     
  7. NicoloTrapasso

    NicoloTrapasso

    Joined:
    Sep 23, 2016
    Posts:
    13
    Hi, i bought this kit and i want to set a win screen that appears when the time of the level finish. Can you help me?

    Sorry for my bad english.
    I love your kit!!
     
  8. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    You can make a timer script like this:
    Code (csharp):
    1.  
    2. public float timeLeft = 30.0f;
    3. public int star_score = 3;
    4. bool timer_end= false;
    5.  
    6.  
    7. void Update()
    8. {
    9. if (!timer_end && !game_uGUI.current_game_uGUI.in_pause)
    10. {
    11. timeLeft -= Time.deltaTime;
    12. if(timeLeft < 0)
    13. {
    14. timer_end = true;
    15. game_uGUI.current_game_uGUI.star_number = star_score;
    16. game_uGUI.current_game_uGUI.Victory();
    17. }
    18. }
    19. }
    20.  
     
  9. NicoloTrapasso

    NicoloTrapasso

    Joined:
    Sep 23, 2016
    Posts:
    13
    Thank you so much, but unfortunately i need a different script. Whit this when the timer end you win and obtained 3 star, i would a timer script that when the timer end you win and take only the star obtained until that moment. This timer it should be visible on the screen.

    example:
    timer start-> you obtained 1 star-> timer end-> you win and obtained 1 star
    timer start-> you obtained 0 star-> timer end-> you lose
     
  10. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    This is a little different. Use the take_star script like in the sceneW1_Stage_2 for the stars
    and this for the timer:

    Code (csharp):
    1.  
    2.  
    3. public float timeLeft = 30.0f;
    4. Public Text timer_text;
    5. bool timer_end= false;
    6.  
    7. void Update()
    8. {
    9. if (!timer_end && !game_uGUI.current_game_uGUI.in_pause)
    10. {
    11. timeLeft -= Time.deltaTime;
    12. timer_text.text = timeLeft.ToString();
    13.  
    14. if(timeLeft < 0)
    15. {
    16. timer_text.text = 0.ToString();
    17.  
    18. timer_end = true;
    19. if (game_uGUI.current_game_uGUI.star_number > 0)
    20.  
    21. game_uGUI.current_game_uGUI.Victory();
    22. else
    23. game_uGUI.current_game_uGUI.Defeat();
    24.  
    25. }
    26. }
    27. }
    28.  
    29.  
    30.  
    with using UnityEngine.UI; at the top of the script (like here)

    Now you only need to add a text element to the canvas and drag it in the timer_text field;
     
  11. NicoloTrapasso

    NicoloTrapasso

    Joined:
    Sep 23, 2016
    Posts:
    13
    Thank you so much, now it's perfect!!
     
  12. cyangamer

    cyangamer

    Joined:
    Feb 17, 2010
    Posts:
    235
    Hi, I'm having trouble with the stage_ico_uGUI.cs script.

    I'm using the Map stage select system, and I can't find how to set the icons to an actual level. Nested_world_stage_select_screen and Single_screen_with_a_page_for_every_world work fine, but something isn't set up for the Map. I get this error:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. stage_ico_uGUI.You_tap_me () (at Assets/mobile game menu kit/script/home scene/stage menu/stage_ico_uGUI.cs:364)
    I can probably dig around in the source and try and fix it, but I wanted to make sure nothing obvious was missed in the Inspector. I follow the screenshot for setting up the game to go to the Map screen. Any help?

    Thanks!
     
  13. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,
    Look in Home_Canvas > Map
    There is an array called "Stage_icons" in Manage_linear_map (script)
    Be sure to click and drag all the icon that you have put in the map into that array in the order of you need.
     
    cyangamer likes this.
  14. cyangamer

    cyangamer

    Joined:
    Feb 17, 2010
    Posts:
    235
    Thanks Lux!
     
  15. NicoloTrapasso

    NicoloTrapasso

    Joined:
    Sep 23, 2016
    Posts:
    13
    Hi Lux,

    1- when i lost all lives i must wait the countdown and i get only one live, but if i need a live system manager like this:



    How can i make? I buy this asset https://www.assetstore.unity3d.com/en/#!/content/41031 but i have failed when i try to integrate in your kit.

    2- i wrote this script, but if i win or lost the stage i keep hearing the sound when the character collides with the particlesPrefab. What can i do and how can i control this sfx with your audio manager(raise the volume-turn down the volume)?

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using UnityEngine.UI;
    4. using UnityEngine.EventSystems;
    5. using UnityEngine.SceneManagement;
    6.  
    7. public class SoundParticles : MonoBehaviour {
    8.  
    9.     private AudioSource audioSource;
    10.     public AudioClip Scored;
    11.     public AudioClip Scored2;
    12.  
    13.  
    14.     void OnTriggerEnter2D(Collider2D coll)
    15.     {
    16.  
    17.         if (coll.name.StartsWith("ParticlesPrefab"))
    18.         {
    19.  
    20.  
    21.  
    22.             audioSource = GetComponent<AudioSource>();
    23.             audioSource.clip = Scored;
    24.             audioSource.Play();
    25.         }
    26.  
    27.         /*if (game_uGUI.current_game_uGUI.lose_screen)
    28.         {
    29.  
    30.             audioSource.Stop();
    31.  
    32.         }*/
    33.  
    34.         if (coll.name.StartsWith("notparticles"))
    35.         {
    36.  
    37.          
    38.  
    39.                 audioSource = GetComponent<AudioSource>();
    40.                 audioSource.clip = Scored2;
    41.                 audioSource.Play();
    42.             }
    43.     }
    44. }
    Sorry, unfortunately i'm a beginner, but i'm trying to learn.
     
  16. NicoloTrapasso

    NicoloTrapasso

    Joined:
    Sep 23, 2016
    Posts:
    13
    Could you help me please???

     
  17. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I'd like to increase the number of collectable stars from 3 to 10. I tried to find everything I'd need to change this, much like adding new levels to a world, but it doesn't seem to work. I ended up changing a few 3's in the scripts to see if I'd be able to do it through there but it won't have it. It counts up beyond 3 in the scene but it won't run the animation at the end of the level or add them to the list of collected stars in the world screen. Also is this asset dead?
     
  18. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi, I'll add this features in the next update.
     
  19. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    That's great news, Lux! I've got another issue while I have you. When I run the demo scene with the 2D character I noticed when I hit the 'exit' collider the player will no longer move, however when I use my own character this doesn't happen. This is happening with a character from an asset called Advanced Platformer 2D as well as Corgi Engine (both are on the asset store) so I'm guessing there's something I need to do with these characters to stop them moving during the win screen? All the UI buttons work at the same time if that's important. And this doesn't happen with the pause menu (I think), although I wonder if that's because it only runs from the start menu?
     
  20. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    You must put this condition:

    if (game_uGUI.allow_game_input)

    In your character controller in order to check if it can take input in that moment.

    For stop enemies and other stuff, you can check these:

    game_uGUI.in_pause
    game_uGUI.stage_end
     
  21. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Soon in Mobile Menu Starter Kit 2.8



     
  22. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  23. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Thanks Lux that's great news! I do have a problem though. After updating my home scene gets stuck on the logo. I've tried playing with a bunch of stuff but can't seem to find a solution. I even tried deleting the Home_Canvas and Manage_Audio but still nothing. I think the prefabs originally became broke but I don't understand why reinserting them into the scene doesn't fix this. The error I get is 'Transform child out of bounds', and its pointing to the Info_bar.
     
  24. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    In manage_menu_uGUI.cs find each
    [HideInInspector]
    and comment them like this /* [HideInInspector]*/

    This will show in the inspector what are the broken parts.
     
  25. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I've changed a few things trying to get it to work but I don't see what it is, any idea?

    upload_2017-10-26_23-0-58.png
     
  26. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    It seem ok. Could you post the whole error message?
     
  27. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Hi Lux,

    Sorry for the delay, I've had some issues with my platforming system that I had to work out.

    This is what I see. Info_bar shows up first, then when I click ok to confirm my profile nothing happens however it does show the remove_padlock error. This is in a scene I created using the previous versions 'home' scene. The screenshot attached screenshot is right after updating, so I've made no changes after updating. Though if the Home_Canvas and manage_audio weren't prefabs I'm guessing mine are now outdated?

    I've now started rebuilding the home scene by copying the one in the assets folder. However I still get the same info_bar error. I don't even need this feature however deleting it causes more problems. Can I just ignore this?

    Regarding the new star feature, it looks like when I enable 'Each Stage Have His Own Star Cap' the number of stars for the first level only displays the number of stars after I've played the level at least once. The first time viewing the page it shows no stars. Is this a bug?

    Oh and one last thing, is there a way to have the level completed without collecting any stars?

    Cheers,
    Louis
     

    Attached Files:

    • test.jpg
      test.jpg
      File size:
      401.6 KB
      Views:
      677
    Last edited: Oct 28, 2017
  28. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I've also got a problem with the final star in the win screen no longer appearing. This was happening in my game and I was playing with it for a while but couldn't find a solution. I just created a blank project and imported the menu kit and its even doing it in the demo. Is this a bug? At this point I can't see it being anything else.
     
  29. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    1- be sure that the stage_ico prefab have the starCountText variable feed in the inspector.
    2- Yes, it is a bug! Go in game_uGui.cs, find
    for (int i = 0; i < total_collectable_stars_in_this_stage-1; i++)
    and change it in
    for (int i = 0; i <= total_collectable_stars_in_this_stage-1; i++)
    3- to disable logo, in home scene go to Home_Canvas > Manage_menu_uGUI
    and set "Show_logo_for_n_seconds" to zero.
    4-to disable pause, open game_uGui, find
    public void Pause()
    and put
    return;
    just at the beginning of that function.
    4- you can disable infobar from home > home_Canvas > Manage_menu_uGUI > Show_info_bar
    (if you don't see that, disable the [HideInInspector], like the other time)
     
  30. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Hi Lux, thanks for fixing the star count in the win screen. Regarding the 'Each Stage Have His Own Star Cap', will we eventually be able to see the total number of stars available in a level before the level has been played? At the moment its shows no stars until I've actually played the level. Not sure how you'd go about this but it'd make things look a little better.

    The reason I'm writing however is because I was hoping there was a way for me to have the player be able to complete a level even if they haven't collected any stars. Sorry if I or anyone else has asked this already, or if the feature already exists but i missed it. I did a quick search in this thread but couldn't find anything relevant.

    Cheers,
    Louis
     
    Last edited: Nov 5, 2017
  31. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    This because the game don't know how much stars you have placed in that stage until it is loaded.
    If you want that the game know that in advance, instead of rely on the automatic count, you must hand-code it.
    Make a new script to put in home scene and that setup the max star value in each stage like this (in void Start()):
    my_game_master.stage_stars_cap_score[my_game_master.current_profile_selected][n_world - 1, n_stage - 1] = total_collectable_stars_in_this_stage;
    where n_world is teh world and n_stage the stage, and total_collectable_stars_in_this_stage is the max stars in that stage.
    The "-1" thing is to remember that array count from 0 so world 1 stage 1 is [0,0]


    Just call
    Victory();
    See the code of the 2 stars win in the first stage of the demo to see how it work.
     
  32. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Soon in version 2.9:
    - All text will be in TextMesh Pro
    - Skin template!


     
  33. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Hi Lux,

    I just imported the asset into a few new projects (some using Unity 2018 some using 2017) and I'm getting a lot of errors in the Console. A lot of scripts appear to be missing from their prefabs. I have Rider installed on my work machine where I'm doing this, but the slot where the script goes says "None (Mono Script)". Do I need to have Monodevelop installed to prevent this?
     
  34. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  35. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I switched over to Visual Studio and created a new project then imported the project from the asset store but same issue :/

    What version of Unity did you use to publish the most recent release?
     
  36. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  37. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Ah previously I was installing TextMesh Pro from the Asset Store. I made sure to use Unity Package Manager and this time also install TextMesh Pro before Mobile Menu Starter Kit and it seems to have fixed the problem. Cheers Lux :)
     
  38. mr_roots

    mr_roots

    Joined:
    Aug 26, 2018
    Posts:
    3
    Hi there,
    quick question: how do I configure the amount of coins needed to buy a world?
     
  39. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,
    In this example you can buy world2 with 1000 coins

    note that "quantity" in store_button, in this special case, is the world number: quantity 1 = unlock world 2 (because the worlds are store in an array and arrays always start count from zero)
     
  40. mr_roots

    mr_roots

    Joined:
    Aug 26, 2018
    Posts:
    3
    wow, I did not expect to configure this in the UI, but thanks for the fast response! ;-)
    What I want is if a user clicks in the world selection screen on a locked world (which has to be bought), the user is forwarded to the shop automatically. Is there a way to achieve this?
     
  41. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    1- Open world_ico_uGUI script
    2- Find public void Click_me()
    3- chenge the code inside "if (my_padlock.enabled)" like this:
    Code (csharp):
    1.  
    2.            {
    3.             print("world " + my_number + " is locked");
    4.            if (!GetComponent<Animation>().isPlaying)
    5.                {
    6.                my_game_master.Gui_sfx(my_game_master.tap_error_sfx);
    7.                
    8.                GetComponent<Animation>().Play("tap_icon_error");
    9.  
    10.                 if (my_game_master.this_world_is_unlocked_after_selected[my_number] == game_master.this_world_is_unlocked_after.bui_it)
    11.                     my_manage_menu_uGUI.Go_to_store_screen(0);
    12.  
    13.                 }
    14.            }
    15.  
     
  42. Sb86

    Sb86

    Joined:
    Sep 5, 2018
    Posts:
    5
    Does this work with AR Foundation?
     
  43. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    No. it is made to work on desktop and mobile, but it is untested in an augmented reality environment.
     
  44. mr_roots

    mr_roots

    Joined:
    Aug 26, 2018
    Posts:
    3
    Hi Lux,
    thanks for all your helpful answers so far!
    One more question: I'm trying to get the 'store' running, e.g. want the users to be able to buy a new world.
    Like you wrote on the 06.Nov.2018 post I configured the shop (special) item.
    (Btw: quantity points to the world number - but dies it start from 0 or 1?)

    Now I'm stuck. How do I continue that it really works with playstore/applestore? What's the next steps?
    I guess I have to add the in app purchase (IAP) services from unity, correct?
    What do I have to configure there - do I have to write my own purchase script?
    (I want to use real money, no virtual money, so it should be a direct buy.)
    Thanks for any help from your side!
     
  45. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,
    World count start from 0.

    The current version support soomla, but right in these days I'm working to implement the unity IAP instead (it will be available from the next menu kit version).
     
  46. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Could you tell me what Unity version you use and when this error happen?
     
  47. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    For some reason the post with the qustion of jty4100 and his next answer is gone from this forum...
    In any case, my suggestion is: check if this prefab have these transform values:



    Because a width = 0, will mess with the automatic placement (division by zero)
    And also be sure that the prefab are active or inactive as showed in this image.
     
  48. sanekthegreat

    sanekthegreat

    Joined:
    Feb 12, 2020
    Posts:
    17
    I want to use Menu Kit in conjunction with other kits of yours (Match 3 and Solitaire), is this kit compatible with these?
    I need the Menu Kit for the menu stuff only, I don't need the shop, the world's map and the stars (since the last two was already included in the respective kits). If I'll just delete the prefabs I don't want, will it be compatible with other kits of yours?
     
  49. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Match3 - It have a specific setup to work together with the menu kit (there is a pdf tutorial in the Match3 asset)
    Solitaire - It is menu agnostic, you can use the menu kit if you want
    Super Solitaire - It have his own menu system (because some win condition require play multiple different stages)

    You can turn them off, just delete pieces of prefab could cause reference errors.
     
    sanekthegreat likes this.