Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Mad Level Manager - Level chooser and manager

Discussion in 'Assets and Asset Store' started by genail, Jul 13, 2013.

  1. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hi isacan,
    Do you mean seasons, boxes, and then levels? I think it's achievable, but will require some time to finish.
     
  2. isacan

    isacan

    Joined:
    Jul 18, 2013
    Posts:
    37
    Yes it is very good featıure i think how to implement like this thing?
     
  3. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    For now the easiest way will be to use one of unity GUI toolkits like NGUI or DF-GUI. It should do the trick :)
     
  4. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    Hello again, how are you doing?

    I've just updated from 1.1.3 to the newer version(1.3.0). The ReloadLevel really helped me. But Just when I reload my MainMenu. The "Draggable" GameObject which has the Mad Draggable Script gets 2 Argument out of range exception, (every frame):

    Code (csharp):
    1.  
    2. ArgumentOutOfRangeException: Argument is out of range.
    3. Parameter name: index
    4. System.Collections.Generic.List`1[UnityEngine.Vector2].get_Item (Int32 index) (at /Applications/buildAgent/work/c514da0c8183631c/mcs/class/corlib/System.Collections.Generic/List.cs:91)
    5. MadLevelManager.MadDraggable.ClosestNeighbor (Int32 index) (at Assets/Mad Level Manager/Scripts/Mad2D/MadDraggable.cs:480)
    6. MadLevelManager.MadDraggable.UpdateDragStop () (at Assets/Mad Level Manager/Scripts/Mad2D/MadDraggable.cs:301)
    7. MadLevelManager.MadDraggable.Update () (at Assets/Mad Level Manager/Scripts/Mad2D/MadDraggable.cs:146)
    And this:

    Code (csharp):
    1. ArgumentOutOfRangeException: Argument is out of range.
    2. Parameter name: index
    3. System.Collections.Generic.List`1[UnityEngine.Vector2].get_Item (Int32 index) (at /Applications/buildAgent/work/c514da0c8183631c/mcs/class/corlib/System.Collections.Generic/List.cs:91)
    4. MadLevelManager.MadDraggable.ReturnToDragStop () (at Assets/Mad Level Manager/Scripts/Mad2D/MadDraggable.cs:440)
    5. MadLevelManager.MadDraggable.UpdateDragStop () (at Assets/Mad Level Manager/Scripts/Mad2D/MadDraggable.cs:286)
    6. MadLevelManager.MadDraggable.Update () (at Assets/Mad Level Manager/Scripts/Mad2D/MadDraggable.cs:146)
    7.  

    Maybe you can help me?

    ps. my workaround solution was to just disable this MadDraggable Script but I think it will break my grid when I add more levels, right?

    ps2. I didn't changed anything on the public properties.

    Thanks!
     
  5. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    I've just figured out!

    When my level finishes I set Time.timescale to 0.0f;
    Solution: I added "Time.timescale=1.0f" to my MainMenuManager Script right on Awake() function;

    The out of range happened because it just cant enumerate with timescale 0.

    I'll keep my post here in case anyone has the same problem. if you wish I delete it.

    Thanks!
     
  6. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello Renanss,
    I'm glad that you've figured it out! You're the second person with timescale problem (same exception and cause of it) that I know. I think I need to insert a timescale check and display some kind of warning.

    Thank you for your report!
     
  7. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    Hi,

    Friend do you remember when you patched that File unknwon error that I was getting on JellyBean versions? After I upgraded the Madlevel, I'm getting this error again. Should I re-apply the patch you send months ago?

    This error happens only on my two Jellybean devices (Nexus 7 and 4). On my HTC Nexus One (version 2.3.4) the madlevel runs ok.

    See error log below:

    Code (csharp):
    1.  
    2. I/Unity   ( 4053): FormatException: Input string was not in the correct format
    3.  
    4. I/Unity   ( 4053):   at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
    5.  
    6. I/Unity   ( 4053):   at MadLevelManager.MadLevelProfile+Level.Read (System.String line) [0x00000] in <filename unknown>:0
    7.  
    8. I/Unity   ( 4053):   at MadLevelManager.MadLevelProfile.LoadProfileFromString (System.String str) [0x00000] in <filename unknown>:0
    9.  
    10. I/Unity   ( 4053):   at MadLevelManager.MadLevelProfile.LoadProfile () [0x00000] in <filename unknown>:0
    11.  
    12. I/Unity   ( 4053):   at MadLevelManager.MadLevelProfile.get_levels () [0x00000] in <filename unknown>:0
    13.  
    14. I/Unity   ( 4053):   at MadLevelManager.MadLevelProfile.IsLevelPropertySet (System.String levelName, System.String property) [0x00000] in <filename unknown>:0
    15.  
    16. I/Unity   ( 4053):   at MadLevelManager.MadLevelRoot.Initialize () [0x00000] in <filename unknown>:0
    17.  
    18. I/Unity   ( 4053):   at MadLevelManager.MadLevelRoot.Start () [0x00000] in <filename unknown>:0
    19.  
    20. I/Unity   ( 4053):  
    21.  
    22. I/Unity   ( 4053): (Filename:  Line: -1)
    23.  
    24. I/Unity   ( 4053):
    25.  
    26. W/Unity   ( 4053): Slide prefabs not set yet.
    27.  
     
  8. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello Renanss,

    Please don't apply this patch, it is already applied in the newer version. This issue seems a little different. Please give me a moment to investigate...
     
  9. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Update: PlayMaker integration 1.0.2 is available for download!

    Get it here!: http://goo.gl/bUezCU
     
  10. rtargosz

    rtargosz

    Joined:
    Aug 22, 2012
    Posts:
    12
    First, this is a very nice asset set that saved me quite a bit of time writing my own from scratch. However, I've spent quite a bit of time trying to get this into the flow of my game (which was already well established with only a splash scene, menu scene and one level scene).

    Would be nice to have an option to use async loading and show a progress dialog.

    Recommend changing ReloadCurrent() to call LoadLevel() like all the other functions so that you can provide two load types: normal and async.

    Add option to play a sound when button is clicked.

    Allow lit backgrounds with appropriate shaders.

    Make it easier to resize the left/right slider sprites. Changing the prefab scales doesn't seem to work.

    Option to have back/escape input go to a specified scene. This is "required" for WP8 and Android especially where users are used to pressing the back button to go to the previous page. In my case, this goes from the level selection scene (mad level root) to a main menu scene where the user can change game settings, login to their profile, etc.

    Make it easier to create a mad level root tree in an existing scene?

    Thanks,
    Rob Targosz
    Sole Proprietor
    Bent Vector Studios
     
  11. wwenthin

    wwenthin

    Joined:
    Nov 1, 2013
    Posts:
    18
    I'm seeing a similar issue to genail. It works fine in unity but when I push it to the nexus 7 tablet I get this:


    Code (csharp):
    1. I/Unity   ( 7314): FormatException: Input string was not in the correct format
    2. I/Unity   ( 7314):   at System.Int32.Parse (System.String s) [0x00014] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Int32.cs:632
    3. I/Unity   ( 7314):   at MadLevelManager.MadLevelProfile+Level.Read (System.String line) [0x00012] in /Users/wwenthin/Documents/Source/GalaxyCab/Assets/Mad Level Manager/Scripts/Base/MadLevelProfile.cs:946
    4. I/Unity   ( 7314):   at MadLevelManager.MadLevelProfile.LoadProfileFromString (System.String str) [0x00024] in /Users/wwenthin/Documents/Source/GalaxyCab/Assets/Mad Level Manager/Scripts/Base/MadLevelProfile.cs:71
    5. I/Unity   ( 7314):   at MadLevelManager.MadLevelProfile.LoadProfile () [0x0001a] in /Users/wwenthin/Documents/Source/GalaxyCab/Assets/Mad Level Manager/Scripts/Base/MadLevelProfile.cs:109
    6. I/Unity   ( 7314):   at MadLevelManager.MadLevelProfile.get_levels () [0x0000a] in /Users/wwenthin/Documents/Source/GalaxyCab/Assets/Mad Level Manager/Scripts/Base/MadLevelProfile.cs:54
    7. I/Unity   ( 7314):   at MadLevelManager.MadLevelProfile.SetLevelBoolean (System.String levelName, System.Strin
    Hope this helps in any way.
     
    Last edited: Dec 17, 2013
  12. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello Robert,
    I've replied to you here: http://redmine.madpixelmachine.com/boards/13/topics/142?r=143
     
  13. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello wwenthin,

    I will send you PM shortly with updated package. This won't fix the issue, but I cannot reproduce it, and output log will help me diagnose the problem. Can you launch it and get the output for me?
     
  14. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    I cannot send you PM for some reason :-(

     
  15. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    @renanss Please check your inbox.
     
  16. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    Sent you a PM.
     
  17. wwenthin

    wwenthin

    Joined:
    Nov 1, 2013
    Posts:
    18
    It would help If I completed the profile setup. Try now.:D
     
  18. Jerware

    Jerware

    Joined:
    May 15, 2012
    Posts:
    41
    Just starting to toy with MLM. Loving it so far, but is the cartoony theme with red buttons available? The one shown in the screen shot at the top of this thread? If so, how to use it?
     
  19. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044

    Hello Jerware,
    Thank you for purchasing Mad Level Manager!

    These buttons are just creation only for the banner, but since you're the second person that asked about it, I've sent an e-mail to person who did this, and maybe I will build a new theme that will look similar ;-)
     
  20. Jerware

    Jerware

    Joined:
    May 15, 2012
    Posts:
    41
    Great! I think it would make a nice addition to the existing themes.

    Another question: I can't find a way to get the current level as an integer index, rather than a string. Is this possible? Perhaps filtered by type?
     
  21. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Do you want index of level defined in the configuration or in the build? There's currently no way to get level absolute index, but you can use MadLevelConfiguration.FindLevelIndex() to get one, but only for a defined level type. Active configuration is accessible through MadLevel.activeConfiguration.

    If you're looking for build scene index, please use Application.loadedLevel.

    What do you need level index for?
     
  22. jpilon

    jpilon

    Joined:
    Dec 14, 2013
    Posts:
    8
    I'm interested in this, is it possible to use mouse scroll wheel for zooming in /out of the free layout mode? Doesn't work in the webplayer.
     
  23. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello jpilon!

    It does not? Ouch... I have to update this example. Scaling of free layout is there for a while, but I haven't made it official, because it doesn't have documentation yet ;-)
    If you decide to purchase my asset, scaling properties can be found here:



    It uses mouse when it's available, or two finger zoom in/out gesture on touch devices.
     
  24. jpilon

    jpilon

    Joined:
    Dec 14, 2013
    Posts:
    8
    Awesome, thanks! New customer coming your way soon.
     
  25. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    This is message to all Jelly Bean 4.3 users.

    After two mysterious reports about Mad Level Manager failing on some Android devices, I've noticed that it all happens on Jelly Bean 4.3. I've downloaded the emulator, launched Mad Level Manager, and reproduced the issue.

    I don't know why and under what conditions, but on this specific Android version when using PlayerPrefs.GetString() there appeared unwanted spaces at the end of a string. Checked it multiple times, converted to hex just to make sure - this is not my fault. I've tried to reproduce this issue in the test environment to send a bug report to unity, but I've failed. Deploy to Android emulator takes about 5 minutes and I've spent 3 hours trying to solve this mystery.

    What I did is a workaround, that will be included in 1.3.1 release. This version will be released around next week (depends of how quick review procedure will go).

    If there is anybody who wants 1.3.1 quicker (it is still untested) then please write a PM to me with your invoice number.
     
  26. Jerware

    Jerware

    Joined:
    May 15, 2012
    Posts:
    41
    Ah, thanks. Application.loadedLevel would do the trick. I needed to load the index because of some existing code that saves debug info to PlayerPrefs based on the level index. I ended up changing that code to use the MLM levelName string though, and it's working perfectly fine. Really liking your asset!
     
  27. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    $prof-farnsworth.jpg

    Good news everyone!

    The update fix the issue.


    Should we keep using this as official?
     
  28. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Do you mean Unity 4.3.2? Well... That's a good news! :)
    Still I will keep the workaround in my code for anyone who wants to use 4.3.1 for some reason.
     
  29. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    No. Your update fixed the issue. That Pm you sent with a new LevelProfile.cs .... Im still using unity 4.2 by the way
     
  30. perdido007

    perdido007

    Joined:
    Nov 17, 2013
    Posts:
    4
    Hello Genail, am happy with your product on the demo side, but on the implementation of playmaker any chance of a demo for a complete newbie, do i have to implement mad level on an empty object or just add FSM's to the existing mad level demo file and if so on what object ? thanking you in advance…cheers
     
  31. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello perdido007,
    Thank you for purchasing Mad Level Manager!

    We're preparing here test package for PlayMaker support. You know, to check on our side if everything is working as expected. I think that it will be finished until tomorrow, then I can send it to you ;-)
     
  32. perdido007

    perdido007

    Joined:
    Nov 17, 2013
    Posts:
    4
    OK thank you Genail, that's music to my ears, i've just been through the whole documentation of it and tried implementing it on my own but cannot make heads or tail of it, guess newbie talk, thank you again and cheers
     
  33. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
  34. perdido007

    perdido007

    Joined:
    Nov 17, 2013
    Posts:
    4
    Thank you, will look into it and keep you posted, have a happy christmas.
     
  35. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Update: PlayMaker integration 1.0.3 is out!

    If you're using Mad Level Manager with PlayMaker, then you should always upgrade Mad Level Manager PlayMaker Integration package to the latest version available.

    You can find download link and changelog here.

    If you’re not sure how to use Mad Level Manager with PlayMaker, you can download example package. We’re using it for our development process to test if everything is working as expected, but it can help you understand how things should be configured.

    Happy New Year to all Mad Level Manager users! :)
     
  36. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Bugfix Release: Mad Level Manager 1.3.1 is out!

    Today a new version of Mad Level Manager has been released. This is a bugfix release, but it also introduces some improvements.

    Bug Fixes
    One important bug has been fixed. On Jelly Bean (Android 4.3) devices in some cases saved player's progress couldn't be loaded back - Mad Level Manager failed with an exception. By further investigation we realized that this must be Jelly Bean/Unity Player bug, and we've provided a workaround. Now everything should be working as expected.

    Improvements
    • Displaying warning when Time.timeScale is set to 0, because it is breaking the drag functionality
    • Level names in the Hierarchy are real level names (this time for sure!)
    • Fonts can be rendered in provided texture color or always white (forced)
     
  37. MSEagle2

    MSEagle2

    Joined:
    Jan 5, 2014
    Posts:
    1
    First off, great product!

    I am having 2 little problems though with the icon. I want to be able to show the locked icon as well as the level number (as opposed to just the locked icon) when a level is locked. How would I go about doing this?

    How can I make it so the icon does either the hover animation or perhaps changes transparency slightly when it is touched on a mobile device?

    Thanks!
     
  38. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello!

    Thank you for purchasing Mad Level Manager, I'm glad you like it!

    I'm assuming that you're trying to do this in one of my example scenes, because they are configured in that way. To change this behaviour you need to remove all elements from this property in the prefab (size should be 0):



    2-step activation for icons will be available in version 1.4.0. There's no simple way to do it right now. 1.4.0 should be released within this month.

    Cheers!
     
  39. aliozan

    aliozan

    Joined:
    Nov 18, 2013
    Posts:
    9
    Hi. I have 150 levels in my game. Level select screen loading time realy long. Also Draw calls: 240 it is too much. How can i reduce draw calls and loading time. Here is ss: $mlm_problem.png
     
  40. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Hello aliozan,

    Wow, that's crazy :)
    I've just woke up, but I have an interesting idea. I will send you a patch that will trigger more aggressively batching as soon as I can confirm it's working.

    Cheers!
     
  41. aliozan

    aliozan

    Joined:
    Nov 18, 2013
    Posts:
    9
    Thank you and a note: draw calls only 10 and loading time pretty good when all level locked. so problem occur when levels have stars.
     
    Last edited: Jan 7, 2014
  42. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    @aliozan
    Done!

    Please have a look:


    What I did is to change GUI depth of icon2Prefab elements:
    - all backgrounds have depth of 0
    - level numbers are 1
    - lock icons are 2
    - starts are 3

    Here's the prefab: View attachment $icon2Prefab.unitypackage

    Why is this working? Because I'm sorting meshes basing on their GUI depth. For instance when all stars are drawn in a sequence, then unity batches all these draw calls to one. When stars and labels had GUI depth of 1 then sequence was shattered to many small pieces, and that's why there were so many draw calls.

    Cheers!
    Piotr
     
  43. aliozan

    aliozan

    Joined:
    Nov 18, 2013
    Posts:
    9
    Draw call issue solved. But still loading time long. Is it possible reduce the loading time. Another issue: i am clicking slideLeft or slideRight then during camera move(slide) if i click again it click level icons(under the slide textures) and level loading. Is it possible disable level loading during slide
     
  44. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Whoa! I've just profiled this piece of code and I fell off the chair. I'm saving the data x times, where x is the number of the levels. Guess what? This generates about 100 megs of garbage. Neat, huh? ;-) Working on the patch right now!

    Don't worry, I remember about the slide icon. I will look at it asap.
     
  45. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    @aliozan I sent you PM a moment ago. Let me know if this is working for you, and I will merge this code with my master branch if it does.
     
  46. aliozan

    aliozan

    Joined:
    Nov 18, 2013
    Posts:
    9
    Thank you genail. Problems solved. Really ultra fast support.(By the way i reviewed on the asset store.)
     
  47. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    I'm happy to hear that! Code merged, patch will be included probably in 1.3.2.

    Thank you very much for the review! :cool:
     
  48. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
  49. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
  50. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,044
    Bugfix Release: Mad Level Manager 1.3.2 is out!

    Mad Level Manager 1.3.2 is out, and it fixes some performance issues when loading level select screen with a large number of level icons.

    This is probably the last version before 1.4.0, so here’s an insight of what to expect in the next big release:
    • iTween-like easing when dragging
    • Two-step icon activation (event support)
    • Grid: ability to set scale and offset for level icons and slide icons
    • Redesigned inspectors for grid/free layouts
    • Improved MadLevel API
    • API for accessing and manipulating graphics elements on level select screen
    • Much better mesh font support
    • Asynchronous level loading
    • Mobiles: programmable “back” button
     
unityunity