Search Unity

Mobile Menu Starter Kit

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

  1. Braun0

    Braun0

    Joined:
    Feb 25, 2015
    Posts:
    12
    Lux,

    I figured out the issue.

    There is a checkbox (unchecked by default) in the Stage_UGui -> EventSystem -> Standalone input Module -> "Allow Activation on Mobile device". It is checked by default in the "Home" scene Home_Canvas EventSystem

    I checked that box and I could then navigate the in-level menus with the gamepad.

    For further clarification on input management:

    The Event System handles the following:
    Horizontal movement
    Vertical movement
    Submit button
    Cancel button

    Specifically, how does submit/cancel in the EventSystem interact/correlate to the button mappings in Manage Audio?
    Start
    Back
    Next
    Previous
    Pause

    What is the difference between:
    Start & Next
    Back & Previous
    In concept, they are basically stating the same action - so I am wondering what their specific functions are from each other.

    Thank you for your quick replies, they are greatly appreciated.
     
  2. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    start:
    - press start button in home
    - open/close pause in game

    back:
    - go to previous menu

    next/previous:
    change stage page in Single_screen_with_a_page_for_every_world
    (by default use the 2 upper gamepad buttons)


    cancel: not used

    submit = is the gamepad button that you use to press the focused gui button
     
  3. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Hi Lux, I got the kill collider working by using your lose script in the package and changing it to a OnTriggerEnter2D (probably should have mentioned I was working in 2D), this works fine now. However in regard to the star script, I decided to play around with it to understand better, but I've hit a roadblock. When I first used the take_stars script you provided me the stage_master sections all came up in red, this doesn't seem to be the case right now, but I am getting errors on these "[", as shown by the sceenshot. I wanted to get the levels unlocking correctly before adding the stars into the actual level.

    Anyway the current issue I'm having is shown in the error log, "rewin same stage: 3 - 3 = 0" this is appearing when I use your win_3 prefab from one of the demo scenes, altered for 2D collision (the same thing I did with the lose script) even when the scene is appropriately named and added to the build list. Elsewhere I saw you mention a stage_master prefab and that the levels needed to be added there(?), but there is no such prefab when I use search in the hierarchy and project I only see a game_master, has this been renamed? I'm probably just being oblivious again, but your help would be appreciated.

    I also noticed a bug I thought I'd make you aware of (though this may be fixed as I'm not using the current version). When a profile has been created I can collect stars, and upon going back to the profile screen deleting the profile and creating a new one the stars do not reset to 0 but remain as they were on the previous profile. Restarting after deleting the profile however does reset the profile score.
     

    Attached Files:

    Last edited: Apr 17, 2015
  4. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Sorry, my mistake I forgot that with new unity gui I rename that.
    Right code is:
    1. GameObject stage_master_obj = GameObject.Find("Stage_uGUI");
    2. game_uGUI _call_stage_master = (game_uGUI)stage_master_obj.GetComponent("game_uGUI")
    And remind to open your game stages from the home scene, because it is here that game_master is started.

    Thank you for this bug report, I'll fix it in next update.
     
  5. Braun0

    Braun0

    Joined:
    Feb 25, 2015
    Posts:
    12
    Hey Lux, I have another question for you.

    The "lose" screen: I have it set to display after my player respawns and the level is ready to play again. The three menu options provided...
    1) Retry
    2) Back to main menu
    3) Level select

    do me no good as I just want a button to exit the lose screen as the level is already loaded.

    I wrote a new function and added it to game_uGUI for the specific purpose of just exiting the lose screen.

    public void ExitMenu()
    {
    if (my_game_master)
    {
    my_game_master.Gui_sfx(my_game_master.tap_sfx);
    my_game_master.Unlink_me_to_camera();
    play_screen.gameObject.SetActive(true);
    Time.timeScale = 1; //default1
    lose_screen.gameObject.SetActive(false);
    }
    }

    I reassigned the "retry" button in the stage_uGUI object to ExitMenu() just to test it out. It works (mostly) in that it does just exit the lose screen and I can immediately play the level.

    The problem:
    When I die again (or any time after the first death), the "lose" screen is never called again. However, after exiting the lose screen for the first time, if I enter and exit the pause menu, then die again - the lose screen is called.

    So there appears to be some value/variable/setting that is not being reset when I exit the lose screen via my function above. And when I enter/exit the pause menu, it is resetting those values so that when I die again it works.

    Since you know your own code way better than I do, I am hoping you will know what I am overlooking.

    Thank you.
     
  6. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Add these:

    allow_input = true;
    in_pause = false;
    my_game_master.star_score_difference = 0;
    play_screen.gameObject.setActive(true);
     
  7. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I added the the lines (into the take_stars script right?) but I'm still getting errors due to these "[", I removed them but that gives me an error on "_call_stage_master .star_number++;", the error states "Unexpected symbol `['" on all the opening square brackets. So I assume the list is required? I added [*] before the lines you provided me but it still says unexpected symbol '['. I'm also getting "error CS0103: The name '_call_stage_master' does not exist in the current context", this is only in Mono Develop not the console. Following this ".star_number" also shows up in red, but only shows a question mark when I hover over.

    Also once this take_stars script is working where do I add it? I'm assuming it goes onto the collectible itself? For reference this is the code you originally provided me, with the updates you provided with an alteration for 2D collider. (I added the "[*]" on lines 14 & 15, I'm assuming that is required? There was also a ";" missing after line 16, I assume that also needed adding?

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class take_stars : MonoBehaviour
    6. {
    7.  
    8.     void OnTriggerEnter2D (Collider2D obj)
    9.     {
    10.         if(col.gameObject.name == "player")
    11.         {
    12.    
    13. [LIST=1]
    14. [*]GameObject stage_master_obj = GameObject.Find("Stage_uGUI");
    15. [*]game_uGUI _call_stage_master = (game_uGUI)stage_master_obj.GetComponent("game_uGUI");
    16. [/LIST]
    17.             _call_stage_master .star_number++;
    18.             Destroy(this.gameObject);
    19.         }
    20.     }
    21. }
    22.  
    You also said when I reach the end of the level call:
    • stage_master _call_stage_master = (Stage_master)stage_master_obj.GetComponent("stage_master");
    • _call_stage_master.Victory();
    Does this need to be a new script and if so applied where and how? Also do any alterations need to be made given the updated script above? Sorry if this is a daft question, scripts are not my strong suit.
     
    Last edited: Apr 20, 2015
  8. Braun0

    Braun0

    Joined:
    Feb 25, 2015
    Posts:
    12
    Lux,

    I already have play_screen.gameObject.setActive(true); added to the code....

    So I just added these three lines with interesting results:
    allow_input = true;
    in_pause = false;
    my_game_master.star_score_difference = 0;

    With all three lines added, hitting the "exit" lose screen button immediately calls the lose screen again (and I lose another life in the counter). So I am just stuck in a loop. This behavior appears to be attached to in_pause = false; because when I remove that line it does exit the lose screen correctly, but "lose" is not called again when I die.

    Any additional thoughts?
     
  9. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    To Braun0 and GrandTheftEx: right now I'm uploading a new Mobile Menu Starter Kit update with both yours request satisfied in a new demo scene (in world 1 stage 2).
     
  10. Braun0

    Braun0

    Joined:
    Feb 25, 2015
    Posts:
    12
    Lux, I have not seen an update hit the unity store. Does it take time to post, or am I missing something?
     
  11. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Each update must pass an human check by asset store staff. Usually take from 3 to 7 working days.
     
  12. Braun0

    Braun0

    Joined:
    Feb 25, 2015
    Posts:
    12
    Hey Lux.

    I am making great progress with integrating your product into my game. However, I am having a lot of issues with sound - as the sound options (in the options menu) like to enable/disable themselves.

    A few examples:
    1) When I create a new profile, all sound options are disabled by default. If I enable them, I have to restart the game for the sound to work.
    2) With all options enabled (music is playing), if I exit a level via the pause menu (choosing the "select level" option), it loads the home scene and disables all sound options.
    3) I have never successful had a win/lose/star sfx play. I am calling the win/lose/star scripts and having those screens displayed at the appropriate time (and I have populated the sfx sound area of the Manage Audio inspector).

    Am I missing a step or not understanding something in regards to music/sfx setup?
     
  13. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    The star collection works great its just what I was after! I'm just having one more issue which should be the last of my troubles!

    I don't know if its just me but I'm having issues with creating a new profile. The old method had us enter a new profile name in the game, now a dialogue box opens and text seems to be entered through the devices own on screen keyboard. A name can be entered, but upon pressing OK it just reverts back to "player" and progression is impossible. This was mid way through working on my project, so I tried it with a completely new version of the package but the same issue occurs. So I don't believe its on my end. I've also tested on both my Samsung Galaxy S3 and emulating through BlueStacks, both having the same issue. So it can't be device specific. Any support on this?

    Also Braun0 I had a few issues with sound starting up or turning off randomly when switching between levels or closing the app then re-opening the app, I think its a little buggy. Nothing as big as you've described though, but I've not really tested on this current version.
     
  14. LuxUnity

    LuxUnity

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

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Thanks for the help that fixed the problem!

    I'm also getting an error when setting lives to infinite. If it helps it says:

    "IndexOutOfRangeException: Array index is out of range.
    Info_bar.Update_me () (at Assets/mobile game menu kit/script/home scene/Info_bar.cs:75)
    store_manager.Update_buttons () (at Assets/mobile game menu kit/script/home scene/store/store_manager.cs:31)
    manage_menu_uGUI.Update_profile_name (Boolean update_world_and_stage) (at Assets/mobile game menu kit/script/manage_menu_uGUI.cs:383)
    manage_menu_uGUI.Start () (at Assets/mobile game menu kit/script/manage_menu_uGUI.cs:164)"
     
  16. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 2.6.2 in upload with options screen and info bar fixed.
     
    Last edited: Apr 23, 2015
  17. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Working on 2.7: full integration with Unity Ads

     
  18. Mr-Blue825

    Mr-Blue825

    Joined:
    Oct 8, 2012
    Posts:
    30
    Hi,

    Is it compatible with Unity 5 ?
    Can you add a windows for all menu, like pause, credit and other ? If you want and can why not with a boolean to display it or not if everyone don't want it.

    Thanks
     
  19. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Yes.
    These menu already exist like full screen pages. But If you like a window effect, you can just change manually the background in order to not cover the game. Or are you thinking to something different?
     
  20. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Mobile Menu Starter Kit - 2.6.2 ready in asset store
     
  21. Mamudoski

    Mamudoski

    Joined:
    Mar 4, 2015
    Posts:
    6
    Hy,
    how can i use the counter for the lives up to the max?

    actually i must wait the time and i get only 1 live (as in "Restart lives") but i need to get 1 live every 5 min (or other time) up to the max lives.
     
  22. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Not by default, but you can write your timer that add:

    if (current_lives[current_profile_selected] < live_cap)
    {
    current_lives[current_profile_selected]++;
    Save(current_profile_selected);
    }
     
  23. Mamudoski

    Mamudoski

    Joined:
    Mar 4, 2015
    Posts:
    6
    Thanks, i must try it.

    After the update i have this problem when i set the lives different of Infinite:


    IndexOutOfRangeException: Array index is out of range.
    Info_bar.Update_me () (at Assets/mobile game menu kit/script/home scene/Info_bar.cs:81)
    store_manager.Update_buttons () (at Assets/mobile game menu kit/script/home scene/store/store_manager.cs:31)
    manage_menu_uGUI.Update_profile_name (Boolean update_world_and_stage) (at Assets/mobile game menu kit/script/manage_menu_uGUI.cs:386)
    manage_menu_uGUI.Start () (at Assets/mobile game menu kit/script/manage_menu_uGUI.cs:160)

    but if the lives are infinite it work.

    and when i put the name (first time) the Window stay, also after click to OK
     
  24. Mamudoski

    Mamudoski

    Joined:
    Mar 4, 2015
    Posts:
    6

    If i coment the line 81 it work. (i don't use continues) i hope it will get no more problems.
     
  25. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Just before line 81 add a new line with:

    if (my_game_master.continue_rule_selected == game_master.continue_rule.continue_cost_a_continue_token)
     
  26. GrandTheftEx

    GrandTheftEx

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

    When do you think we'll see 2.7 in the asset store? I have a deadline on Sunday and was hoping to have ads implemented by then. Though obviously I don't expect anything, it would be a nice addition.

    I actually came to ask about Unity Ads but it seems you're already working on it. This is great news! I was wondering though, when it gets released will we need to download the Unity Ads asset pack from the asset store and implement the 3 lines of code in the "read me" file provided by them? Or will your update include this? Thanks.

    Louis
     
  27. Mamudoski

    Mamudoski

    Joined:
    Mar 4, 2015
    Posts:
    6
    Hi,
    it's me again.

    How can i fix the audio as 3d? i hear my car only on the Right headphones, and no from left.

    Previosly i uset a camera with the listner, that follow my car. But now i can't use 2 listner "There are 2 audio listeners in the scene. Please ensure there is always exactly one audio listener in the scene."

    Any ideas?
     
  28. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Disable the audio listener of the menu kit, keep as 2D music and menu sfx and as 3d your game sfx.

    I'm working in a deep integration with it and I also find a gui bug in unity 4.6 and 5 and must find workaround for it, so I don't think that sunday is realistic.

    I hear that unity plan to integrate unity ads directly in unity editor, so I think that keep it in my asset don't will be a problem. They never block one of my assets because in it there was the unity character controller, so I think will be the same.
     
  29. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Not a problem. I look forward to the update! And thanks for the reply!
     
  30. Mamudoski

    Mamudoski

    Joined:
    Mar 4, 2015
    Posts:
    6
    Hy,
    I want to make a Special Scene as a 3d Menu/Shop. So the user can buy 3d objets like a car or a character wit wirtual money. The money are from the Menu Starter Kit

    I want to be able to use your Info_bar at top, and a simple button for Go_to_home_screen.
    If i just copy the Info_bar from the main, it has not the real value of Money.

    Can you please help me?
     
  31. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    By now a 3d shop not is supported. I'll think if implement it, but by now I'm are too busy for that.
     
  32. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  33. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    2.7 in asset store with:
    - improved store page
    - new int score system
    - support for unity ads
     
  34. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Where do I change Unity Ads settings within your package? I'm not seeing anything for 2.7 in the asset store, my laptop shows 2.6.2 and my desktop just says "Mobile Menu Starter Kit", yet both release nots show Unity Ads support. Tried downloading them again but its the same package. Has the Package not been updated yet? Not sure why I'm seeing 2.6.2 but no update option.

    EDIT:

    Package Contents in the Asset Store shows ads_master_editor.cs should show in the Editor folder, yet I only have game_master_editor.cs. My package definitely isn't updating.
     
    Last edited: Jun 1, 2015
  35. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    You don't see this?

    Last line say: Version 2.7 May 27, 2015.
     
  36. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I do. However when I click Import (where yours says "buy $10") it imports the version without the ads_master_editor.cs in the Editor folder. And my downloads section in the Asset Store still says 2.6.2, with no update option.
     
  37. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Maybe you need to update unity to most recent version.
     
  38. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I'll give that try, thanks.
     
  39. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Already have newest version installed. Also tried deleting asset files from the AppData\Roaming\Unity\Asset Store folder but it just re-downloads the older file again. I was going to post on the forums for assistance but I think I'll wait a day or two, maybe the problem will fix itself. Although I did see another asset on the store not being updated - http://forum.unity3d.com/threads/njg-minimap-released.179471/page-10#post-2139041
    It may be unrelated. Thought it worth posting though, could be just me but maybe its a Unity issue.
     
  40. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Issue is resolved. You were right it was an outdated version of Unity, built in updater threw me off I had to go to their website and download the newest version.
     
  41. shawnrevels

    shawnrevels

    Joined:
    Aug 13, 2014
    Posts:
    86
    Lux,

    I just bought your asset, awesome job BTW. I have One Issue. Take A look at the Screen Shot and Let me know what you think. I Tried to upload crossplatorm asset from standard assets but its a no go still.
     

    Attached Files:

  42. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    I don't know why crossplatorm asset give you this error, but the good new is that you don't need it. Just delete the line code point out by the error. Lines 19-20-21-23-32-33-34-36 in Platformer2DUserControl.cs
    This script it is used just to run the character in the demo scene W1_Stage_2, the menu kit is fully functioning even without it.
     
  43. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I'm having a seemingly strange bug whereby playing my scene in the editor works fine, however when I run a test version on my phone I cannot interact with the stars, checkpoint, death or end point. The weirdest thing is that it was working not long ago. It seems to be something I've caused, so any idea what I've done?
     
  44. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Stars, checkpoint, death or end point interact with the player character when a collision happen, not tapping on it.
    So:
    - check if the collison element that moves have rigidbody2d. If your game is in 3d instead use rigidbody3d for the moving element and update the scripts and colliders of Stars, checkpoint, death or end point from 2d to 3d.
    - Be sure to have a player, with a tag like the one in the example, that can be move with touch input.
    - check if you have _gui_ tag in unity tag list.
     
    Last edited: Jun 28, 2015
  45. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    I've looked into my character and I could find no issues. I had though the problem was being caused when importing my character and all it contains, however I had been testing my own character only (because standard asset player doesn't have mobile support) on my Galaxy S4. I then emulated in Bluestacks only to get the same results; the player passes straight through stars, checkpoint, death etc. on device, despite working in editor. I then decided to test the standard asset player with this (because I can use mouse and keyboard for controls). The player interacts fine in the editor, but has the same issue as my character when running on Android. Again I could not interact.

    So forgive me if I'm wrong but I believe the issue may be a bug with the kit. Hopefully a minor one. Could you test this on your end and see if you get the same results? Thanks.
     
  46. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Could you post a screen of your tag list?
    This problem most likely is because your project don't have the _gui_ tag
     
  47. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    Sorry I forgot to mention, the only place I see the _gui_ tag applied is on Stage_uGUI, is it supposed to be applied elsewhere? I attached a screenshot, this is the W1_Scene_2 that came in the mobile menu kits scenes folder.
     

    Attached Files:

  48. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    You don't must apply it on other stuff, but you must check if it there is in Edit > Project Settings > Tags and Layers.
    Because some time it is applied accurately on prefab tag, but if it miss in Tags and Layers, it will work on editor, but not in the build.
     
  49. GrandTheftEx

    GrandTheftEx

    Joined:
    Jan 14, 2013
    Posts:
    32
    This is what I get when I go to that location. Does it look correct?
     

    Attached Files:

  50. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Yes, it is correct! If don't work in that way, try to make a built for pc or mac and see if that work or have the same issue on android (you need test only W1_Stage_2)