Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mad Level Manager - Level chooser and manager

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

  1. Databases

    Databases

    Joined:
    Mar 24, 2014
    Posts:
    22
    Hello, genail

    i got another problem

    when i set Time.timeScale to 0 i get an error message says the following " Level selector may not work when Time.timeScale == 0. Setting it to 1. "

    well, how i can pause my game?

    Thank you for your time.
     
  2. IOZO

    IOZO

    Joined:
    Jun 26, 2010
    Posts:
    55
    ok thanks. let me know when you have something. For now I'll combine it with another extension (Game Data Editor) and store the GDE id in the parameter field. But a more integrated solution would be very welcome.
     
  3. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Databases,

    You cannot keep your Time.timeScale at 0 on level select screen indeed, but this error is not the case on regular game levels. Do you have level select screen hidden on your game scene by any chance? If yes, you need to disable it.
     
  4. serkanos

    serkanos

    Joined:
    Jan 12, 2013
    Posts:
    28
    Hi. How I do this world select screen as dragable. I made this 3ds max :)
     
  5. Databases

    Databases

    Joined:
    Mar 24, 2014
    Posts:
    22
    Thanx for
    Sorry i think i have to illustrate

    I'm using Time.timeScale = 0 in the game level but not level select screen

    So the level selector is working but when i just select the level from the level selector, the level just freezes, but i did set Time.timeScale in an if statement, so it looks like it is not checking my if statement and just executing it immediately after selecting the level. Note that when i start the level from unity(i mean not using level selector) the level works fine!

    I don't know what exactly you mean by level select screen hidden on my game scene, can you please explain more if it is still the problem?

    Thank you.
     
  6. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello sekanos,
    I believe that you'd like to use pages of single grid layout. In your example you have 3 levels for each page. Please to configure grid layout so it will have 3 columns and 1 row, then create a configuration where levels for world 1 will be first 3 levels, then for world 2 it will be level 4, 5 and 6. There will be an issue with level numbers, but if this solution will work for you, I can add some improvements into MLM code to satisfy your needs!

    Cheers!
    Piotr
     
  7. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Can you show me your script and tell me to what game object it is connected (and on which scene this game object is)?

    If you don't about this, then I'm 99% sure that this is not the case :)
     
  8. Databases

    Databases

    Joined:
    Mar 24, 2014
    Posts:
    22
    I have a countdown timer script that is associated with GUI Text object in a scene call "Level_1" so when time reaches Zero, Level_1 should be paused and then load a new scene called "Game_Over"

    the game time is counting from 60 to 0

    so,

    if (gameTime <= 0F)
    {
    Time.timeScale = 0
    MadLevelManager.MadLevel.LoadLevelByName("Game_Over");
    }

    Note that when i set Time.timeScale to 1 in the above script, the game runs okay and the time starts counting from 60 to 0, but when i set it to 0, then the game just starts frozen.

    And as i said the above script works fine when i run Level_1 scene from unity directly, the game is paused and the scene "Game_Over" is loaded correctly, but when i try to run it from Level Selector scene, then it is just starts frozen!

    Also, if I remove the IF STATMENT from the script, i can load Level_1 from Level Selector and it runs okay and starts counting down without any problem, i guess the problem is around the IF STATMENT.

    8 hours i'm working on it, and still working on it, if i find a fix i will share it with you.

    Thanx again.
     
    Last edited: Sep 16, 2014
  9. Databases

    Databases

    Joined:
    Mar 24, 2014
    Posts:
    22
    Well Done! i figured out what actually the problem is and i'm completely happy because i could fix it myself :)

    The problem is that when i select Level_1 from the Level Selector, unity doesn't directly starts counting down from the specified time which is 60 seconds, when the level starts unity starts from Zero then it starts counting down from the specified time, so the if statement is 100% true and that's why it is immediately executed when the level starts and the level directly gets paused.

    So to fix it i just edit the code like the following:

    if (gameTime > 0 && gameTime <= 0.1)
    {
    Time.timeScale = 0
    MadLevelManager.MadLevel.LoadLevelByName("Game_Over");
    }
     
  10. serkanos

    serkanos

    Joined:
    Jan 12, 2013
    Posts:
    28
    thank you genail . I did it. But I couldnt level names 1,2,3 in world 2 or world 3.
     
  11. BigStudio

    BigStudio

    Joined:
    Sep 17, 2014
    Posts:
    1
    Hello,
    I'm testing the examples of Mad Level. I always see the camera symbol when play scene. I want this don't show the camera but don't know to do. Please help me!
     
  12. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I'm sorry. Something is not right with Unity Forums notifications... I haven't received any notification about latest messages. I will write a reply to each message shortly...

    If this will happen again, please write to me directly to support@madpixelmachine.com
     
  13. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I'm glad that you've figured that out! Thank you for sharing your solution with us :)
     
  14. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Serkanos,

    This was the improvement that I was talking about. If you want, I can prepare this one for you in 1-2 days.
     
  15. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello BigStudio,

    I believe that you want to play with your scene Gizmos:



    You can try to disable 3D Gizmos to make your camera gizmo smaler (1) or just disable the camera gizmo (2). Just try it :)

    Cheers!
    Piotr
     
  16. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I missed this the last time it was on sale. Glad to have picked it up today!
     
  17. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello,
    Thank you for purchasing it! :)

    Please write if you will have any issues, questions or feature requests!
     
  18. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    760
    Congrats on being featured on the Asset Store home page, well deserved. Best customer service ever!
     
  19. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Thank you! :)
     
  20. morepixels

    morepixels

    Joined:
    May 21, 2014
    Posts:
    18
    Hello,
    Can I use the Mad Level Manager API without UI at all? I have a pretty complex UI setup in NGUI and can't replace it with other UI. I would like Mad Level Manager to store star counts and keep track of which levels are unlocked. Is is possible without using UI?
    Thanks
     
  21. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello morepixels,
    Sure, you can!

    The UI stuff is only for the level select screen. If you don't need it that's totally fine. In fact, there's no need to replace anything. I am currently using level select screens and NGUI together.

    Please write if you have any more questions!

    Cheers!
    Piotr
     
  22. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Important Announce for all Mad Level Manager users!

    If you've upgraded Mad Level Manager to version 2.2.1a you wouldn't be able to build your project unless you will remove using UnityEditor; line from MadLevelYouAreHereScript.cs file.

    I'm sorry for the inconveniences and I am a little angry now. I am sure that I've had canceled the release of 2.2.1a and replaced it 2.2.1b which has this bug fixed, but it seems like Asset Store software (or someone) have not received the newest version. It's now pending in the review queue.

    Kind Regards,
    Piotr
     
  23. morepixels

    morepixels

    Joined:
    May 21, 2014
    Posts:
    18
    Dear Piotr,

    I try to use MadLevelProfile.IsLocked in a global Awake function. It always returns the fallback result 'false'. Upon further investigation, I've discovered that it's looking for property %locked% in levels, but there is no such property. Am I doing something wrong? Should there be some initialization first? I am using only MadLevelProfile class, without UI.

    Thank you
     
  24. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello morepixels,

    Usually locked properties are set by level select screen. This is done in that way, because this is the usual entry point for Mad Level Manager is the level select screen.

    I've modified MLM a little, so in 2.2.2 you will be able to execute:

    Code (CSharp):
    1. MadLevel.activeConfiguration.ApplyProfile();
    On the start of your game, and locked levels information will be applied to the profile.

    I'm sending you 2.2.2-preview 1 as private message. Please check your inbox :)

    Cheers!
    Piotr
     
  25. morepixels

    morepixels

    Joined:
    May 21, 2014
    Posts:
    18
    I got it, thanks!

     
  26. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.2.1 is now available to download from the Unity Asset Store.

    The latest release introduces new Profile Browser tool, fixes atlases support, and a lot more! upload_2014-9-25_21-48-27.gif

    New Features
    • Profile Browser tool (allows you to inspect saved data)
    • PlayMaker: Queries for counting levels and adding property values
    Bug Fixes
    • Free layout: Fixed icon animations
    • Atlas creation could fail in some cases when textures were not readable
    • Layout API: Warning when API functions are called too soon on level select screen
    • If icon is locked, the activation sound will not be played
    Improvements
    • Slide icons are now using GameObject active flag instead of tint (color is not discarded)
    • MadSprite preview now takes sprite color into the account
    • When initializing an empty scene with no camera, Camera 2D is tagged as MainCamera
    • Warnings and info boxes about incorrect camera setup when using anchors
    There's Mad Level Manager trial version available! Test it for 14 days and decide if it is suitable for you!

    Cheers!
    Piotr
     
  27. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hi genail, I want to create the level selection scene with switching backgrounds like this:

    It's possible to swtiching backgrounds for different chapters ?
     
  28. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Dor1n,

    Usually different chapters should be different scenes, so it won't be a problem. If you want to create it on a single level select screen it might be a problem. I've received numerous of requests like this, so I think I will implement something like this for 2.3.0. What is your deadline?

    Cheers!
    Piotr
     
    RoyalCoder likes this.
  29. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hello Piotr, is not a hurry for me ... I will need this feature let's say in 3 weeks maybe a month from now ...great news if you will implement this feature in next realeses ! ;)

    Cheers,
    Dorin
     
  30. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hi Piotr, today I updated the MadLevelManager and I get this error:
    Assets/Mad Level Manager/Scripts/Editor/Tools/MadLevelProfileBrowser.cs(79,33): error CS0433: The imported type `MadNaturalSortComparer' is defined multiple times :(
    How can I fix this ?!
     
  31. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello,
    Just remove MadNaturalSortComparer.cs :)
    This issue can be observed only when you have Energy Bar Toolkit imported into your project.

    I'm sorry for the trouble.

    Cheers!
    Piotr
     
    RoyalCoder likes this.
  32. tolgaclk

    tolgaclk

    Joined:
    Aug 25, 2014
    Posts:
    1
    Hi,
    I had a three levels, and while I test unlock the levels , all levels are open now,
    but I cannot unlock again :(
    is there any clean cash or past ....
    help please
     
  33. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello There,

    Most probably you want to reset your profile.
    Please try resetting your profile using the Profile Tool.

    Cheers!
    Piotr
     
  34. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.2.2 is now available for download!

    As usual it introduces some important bug fixes, improvements, and one new feature: different enumeration methods for level icons. Levels icons can now be labeled not only by numbers (1, 2, 3) but also using letters (A, B, C) or Roman numbers (I, II, III, IV).


    New Features
    • Level icon enumeration now can be: numbers, letters, and roman numbers
    Improvements
    • Level Configurator: Levels can be removed by selecting and pressing Delete key
    • Configuration settings is applied to the profile on load
    Bug Fixes
    • MadNaturalSortComprarer was conflicting with the same type from Energy Bar Toolkit
    • MadLevelQuery.CountLocked() and CountUnlocked() was not working correctly when executed on level select screens
    There's Mad Level Manager trial version available! Test it for 14 days and decide if it is suitable for you!

    Cheers!
    Piotr
     
  35. HiCallMeAce

    HiCallMeAce

    Joined:
    Feb 25, 2014
    Posts:
    21
    Hello I bought One of the themes put its not working i keep getting an error . is there anything i can do to fix this error i bought the bubble blue theme.


    NullReferenceException: Object reference not set to an instance of an object
    MadLevelManager.MadFont.get_textureAspect () (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadFont.cs:69)
    MadLevelManager.MadText.GlyphBounds (MadLevelManager.Glyph g, System.Single& xAdvance) (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadText.cs:217)
    MadLevelManager.MadText.LineWidth (System.String text) (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadText.cs:146)
    MadLevelManager.MadText.UpdateText () (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadText.cs:93)
    MadLevelManager.MadText.UpdateTextIfNeeded () (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadText.cs:72)
    MadLevelManager.MadText.DrawOn (MadLevelManager.MadList`1& vertices, MadLevelManager.MadList`1& colors, MadLevelManager.MadList`1& uv, MadLevelManager.MadList`1& triangles, UnityEngine.Material& material) (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadText.cs:235)
    MadLevelManager.MadBigMeshRenderer.LateUpdate () (at Assets/Standard Assets/Mad Level Manager/Scripts/Mad2D/MadBigMeshRenderer.cs:110)
     
    Last edited: Oct 5, 2014
  36. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello HiCallMeAce,
    It looks like that something is wrong with the theme, most probably a material is missing. You can try to recreate the font from the fnt file (if provided) or please write to the author. I will contact him as well regarding this issue.

    Please let me know if you will get this working and I will get back to you as soon as I will know something :)

    Cheers!
    Piotr
     
  37. HiCallMeAce

    HiCallMeAce

    Joined:
    Feb 25, 2014
    Posts:
    21
    I sent author and email just waiting for response thanks for the reply.
     
  38. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    Hey there, I'm the author of the theme it's self, I thought I'd jump on here to talk about the issue, I haven't managed to replicate the problem on my end I'm afraid. In some cases it may be just a case of reimporting assets. Sometimes assets don't import into Unity correctly first time or it may crash half way through etc. I get this problem all the time at work on other projects so it may well be worth it. Also make sure you have both the Level manager and the theme in your project~

    I mention it on here just incase anyone else has the same issue is all. =) Let me know if this has helped at all. And thank you for your purchase!
     
  39. HiCallMeAce

    HiCallMeAce

    Joined:
    Feb 25, 2014
    Posts:
    21
    I was able to fix the issue it was just the font prefab that needed to be fixed for the HD scene Thanks for your quick response and help.
     
  40. HiCallMeAce

    HiCallMeAce

    Joined:
    Feb 25, 2014
    Posts:
    21
    Sorry for the double post but i had a question im trying to get the star system to work with mad level manager but not sure how to replace it with current system already in place here is what my code looks like just wondering if there is an easy way to replace it or would i have to rewrite the whole code. using js if it matters

    if(finalscreen.starcount == 3)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*0.9,starY,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY,starwidth,starwidth),star[0]);
    }
    if(finalscreen.starcount == 2)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY,starwidth,starwidth),star[1]);
    }
    if(finalscreen.starcount == 1)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY,starwidth,starwidth),star[1]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY,starwidth,starwidth),star[1]);
    }
    if(finalscreen.starcount == 0)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY,starwidth,starwidth),star[1]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY,starwidth,starwidth),star[1]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY,starwidth,starwidth),star[1]);
    }

    if(PlayerPrefs.GetInt("SH_"+Application.loadedLevelName+"_hiscore_star") == 3)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY1,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY1,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY1,starwidth,starwidth),star[0]);
    }
    if(PlayerPrefs.GetInt("SH_"+Application.loadedLevelName+"_hiscore_star") == 2)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY1,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY1,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY1,starwidth,starwidth),star[1]);
    }
    if(PlayerPrefs.GetInt("SH_"+Application.loadedLevelName+"_hiscore_star") == 1)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY1,starwidth,starwidth),star[0]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY1,starwidth,starwidth),star[1]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY1,starwidth,starwidth),star[1]);
    }
    if(PlayerPrefs.GetInt("SH_"+Application.loadedLevelName+"_hiscore_star") == 0)
    {
    GUI.Label(Rect (windowfunRect.x*0.7,starY1,starwidth,starwidth),star[1]);
    GUI.Label(Rect (windowfunRect.x*0.90,starY1,starwidth,starwidth),star[1]);
    GUI.Label(Rect (windowfunRect.x*1.1,starY1,starwidth,starwidth),star[1]);
    }
    }

    function animscorefun()
    {
    wait +=Time.deltaTime;
    if(wait > 0.0001)
    {
    wait = 0.0;
    displayscore +=100;
    score -= 100;
    if(score <=0)
    score =0;
    }
    }
     
  41. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello There,

    I see that this code is responsible for displaying the stars. With Mad Level Manager you don't need to write the rendering code. Instead you have to set your properties to be true (enabled) or false (disabled) using the Save & Load API.

    In examples star properties are called star_1, star_2 and star_3 so you will need to set them separately. Please see the level tester example scene :)

    Please write if you have more questions!

    Cheers!
    Piotr
     
  42. HiCallMeAce

    HiCallMeAce

    Joined:
    Feb 25, 2014
    Posts:
    21
    Hello,

    I have looked through the api and test scene tried many different things but cant seem to get stars to show up after the level is complete maybe im doing something wrong am i supposed to have a manager in all my level scenes and im not really understanding the madleveltest controller then i was looking at the madleveltest options script which looks like it calls from the testcontroller i might be missing something but still not able to figure what exactly im supposed to do.
     
  43. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I will send you a PM with my Skype ID. Please write to me.
     
  44. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Please enable private messages (conversations) for your account.
     
  45. HiCallMeAce

    HiCallMeAce

    Joined:
    Feb 25, 2014
    Posts:
    21
    I think it is enabled.
     
  46. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    For some reason I don't see "start a conversation" button. Please write to me to support@madpixelmachine.com, and I will write back to you :)
     
  47. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hello HiCallMeAce , I had this problem too I managed like this:
    Code (CSharp):
    1. //FINNISH LEVEL
    2.  
    3.                 if (other.gameObject.tag == "Finnish") {
    4.                 if (curScore < 300){
    5.                 MadLevelProfile.SetCompleted(MadLevel.currentLevelName, false);
    6.                 }
    7.  
    8.                 if (curScore >= 900){
    9.                 MadLevelProfile.SetLevelBoolean(MadLevel.currentLevelName, "star_1", true);
    10.                 MadLevelProfile.SetCompleted(MadLevel.currentLevelName, true);
    11.                 }
    12.  
    13.                 if (curScore>= 1000){
    14.                 MadLevelProfile.SetLevelBoolean(MadLevel.currentLevelName, "star_1", true);
    15.                 MadLevelProfile.SetLevelBoolean(MadLevel.currentLevelName, "star_2", true);
    16.                 MadLevelProfile.SetCompleted(MadLevel.currentLevelName, true);
    17.                 }
    18.  
    19.                 if (curScore>= 1300 && curCoins>= maxCoins && curDaimonds >= maxDiamonds){
    20.                 MadLevelProfile.SetLevelBoolean(MadLevel.currentLevelName, "star_1", true);
    21.                 MadLevelProfile.SetLevelBoolean(MadLevel.currentLevelName, "star_2", true);
    22.                 MadLevelProfile.SetLevelBoolean(MadLevel.currentLevelName, "star_3", true);
    23.                 MadLevelProfile.SetCompleted(MadLevel.currentLevelName, true);
    Hope this will help you ;)
    Cheers,
     
  48. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Announce: Mad Level Manager Loading Screen Add-on

    For all Mad Level Manager users. Soon on the asset store there will be available an add-on for Mad Level Manager. It will offer powerful and customizable loading screens support. It's based on Mad Level Manager extensions feature. You can read more about it here:

    http://www.madpixelmachine.com/2014/09/25/new-add-on-for-mad-level-manager-loading-screens/

    And here's the unfinished documentation:
    http://madlevelmanager.madpixelmachine.com/doc/draft/addons/loading_screens.html

    If you're interested in this kind of functionality, please let me know what are your expectations about this kind of script. I am here to listen :)

    Cheers!
    Piotr
     
    RoyalCoder likes this.
  49. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    This sounds great! I was planning on writing my own implementation for this. I'm glad I won't have to. When do you think it will hit the store?
     
  50. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I was hoping to send the 1.0 today, but there were things that were not working correctly and some other things that could work better. Now I'm quite happy with what I've got, but I need to send the updated MLM version to the Asset Store first. It all can take 2-3 weeks depending on testing duration (each MLM version is tested by Qler) and the Unity Asset Store review process.

    Please let me know if you have any specific requirements! :)

    Cheers!
    Piotr