Search Unity

[RELEASED] Easy Main Menu

Discussion in 'Assets and Asset Store' started by walledcityinfotech, Sep 23, 2017.

  1. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    So what are the quality settings adjusting as of right now? Are they adjusting the editor quality settings and then saving that to PlayerPrefs?
     
  2. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Yes exactly!
    We are saving vSync, anti alias, shadow quality, resolution, etc.
    All which has to be tweaked via editor, we are tweaking that at runtime in game! :)
     
    JamesArndt likes this.
  3. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Hi,
    I haven't used master audio. So integrating with it might give a headache. But judging by the name, basically all you have to do is just call Master Audio's Play Audio Method instead of Easy Audio Utility's play audio method! :)

    This is exactly what I did in easy save 2 integration as well. Instead of saving things via player prefs, I called es2's save methods! :)
     
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    Yeah, it's not a big headache to work around myself, but it just means that I have to re-fix it every time there's an update. But at some point I'll stop updating anyway so not that big of a deal. Just something to think about.
     
  5. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Yaa, I can feel the pain, you can have your own script so instead of modifying the emm's script just use it to call the play Audio Method and I will add a boolean in the Easy Audio Utility's inspector to see whether you want to use it or not. You can uncheck that ! :)
     
  6. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    What were some of the workarounds you accomplished to get this working? I have discovered if I remove the "MainMenu.cs" script (RFPS) from the FPS Camera object within the player hierarchy I can eliminate the RFPS menu that pops in-game. However I'm looking through the Easy Main Menu's "UI_Controller.cs" script that is on the "Gameplay UI" prefab in my scene. I see that a function called "openPauseMenu() is setting the time scale to almost zero, so the entire gameplay scene should be frozen in space. For some reason it isn't and my player can fire their weapon and run around in this state so I'm kind of at a loss for why that is happening. I think I can put my code in this function for unhiding the mouse cursor as RFPS is hiding it when you hit the play button in a scene. I would like to sort out this time scale issue though.

    EDIT - I observed something very strange happening. Just to diagnose what was happening with the Time Scale I opened up the Time Manager in the Inspector to see what the Time Scale value was when I hit the escape key in-game (while it's running). The Time Scale would go to almost zero as it's told to do in the "openPauseMenu()" function within "UI_Controller.cs", but then it smoothly lerps back to 1 again! All while still in a paused state.
     
    Last edited: Mar 28, 2018
  7. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    I am noticing other strange behavior with Easy Main Menu. If I rename the elements within some of the panels, i.e. GameOptions or Control Options the menu panels no longer animate into place properly. No idea and cannot drill down into what is causing this.
     
  8. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    The Unity's Animation system is.... Just... working on God's Grace.. lol
    If you animate any game object and after animating, change it's name, The animation won't recognize it and hence, the Animation won't work... Best solution is to just leave it as it is or else you have to reanimate everything again... :(
     
    JamesArndt likes this.
  9. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    I kind of was thinking this might be the issue, but it seems intuitive on the Unity editor side of things (not you guy's package at all). Thank you for the guidance.
     
    walledcityinfotech likes this.
  10. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    187
    RFPS not suport :(
     
  11. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    Not out of the box no, but I'm making progress on my end. The developer here said it will be coming in the next update, so RFPS support is coming. I was approaching getting Easy Main Menu to work with RFPS wrong. Initially I was trying to use the Easy Main Menu prefab for in game GUI and setting that up to control the RFPS components. This was not working. I found to take the RFPS in game menu code, strip out all of the GUI stuff and leave only the stuff that controls pausing the actual game. Use a function in the RFPS menu to call up the Easy Main Menu. I'm very close to having it working. Basically Easy Main Menu will no longer be controlling disabling the RFPS components or setting Time Scale...this will be controlled from RFPS itself.
     
    walledcityinfotech likes this.
  12. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    This is exactly what I did with ufps Integration bro!
    Every gameplay mechanic is controlled by ufps only, I just called my pause menu ui from the separate script coordinating with the ufps inputs. :)
     
    JamesArndt likes this.
  13. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    Yeah I pretty much did exactly that. I duplicated the RFPS Main Menu script, stripped it all out with the exception of the pausing code and saved it under a new name. Now that script calls up and controls everything with Easy Main Menu.
     
    walledcityinfotech likes this.
  14. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Dude that's so sick! :D
    Awesome work, if you have time can you make a video and show how it's looking? :)
     
    JamesArndt and Adrad like this.
  15. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    Yep that's easy. So as you will see I am right in the middle of swapping out my artwork for the placeholder Easy Main Menu artwork, so that's not all done. I haven't set up my own menu animations either, and I will be making those more unique to my own game. Now I'm having two issues while in game and the menu pops up. You can see both issues in the video. First issue is the paused state seems to get out of sync between EMM and RFPS. This happens when I hit the resume button on the menu and I believe when I hit the Escape Key (but I need to test that one). I know this is an easy fix somewhere where the Resume button just needs to be in sync with the RFPS Escape Key functionality and both need to be in sync when in a paused state. The next issue only occurs when I hit that "Main Menu" button and I honestly have no idea what is happening with that yet. I will have to Sherlock Holmes that bad boy and sort it out. Otherwise, yes Easy Main Menu is working with RFPS right now, just minor things to sort out.



    By the way if anyone has interest in following my progress on this project, these are the places I put updates for that.
    YouTube development Vlog
    Facebook Group
    Official Subreddit
     
    walledcityinfotech likes this.
  16. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    WHAAT!! This looks So EPIC MAN!!! :D even with that pause bug lol... no kidding but this just looks so professional!! :D

    Your lighting put unreal engine's lighting to shame!
    Keep it up man! Awesome Work! :D
     
  17. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    It looks quite a bit better in the build too, it lags in the editor using OBS to record (I don't have the best nVidia card). The lighting I try to nail first before I start creating materials. I just started on this in this newer editor version, so it has no polish on it at the moment. I've just been porting over assets from the older 5.1 version. I didn't move to 2017 due to UI canvas bugs they had at the time and 2018, I just don't move into a beta until it's proven for a while.

    I just realized my fire ember particles are not showing in the menu either...my 3D camera in that scene overlaying the EMM camera had the wrong depth value. I do want to do little animations on the buttons for hover states as well, maybe something that looks like a small shake from a cannon being fired or a musket being fired.
     
    walledcityinfotech likes this.
  18. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    @walledcityinfotech I'm just starting to get this integrated into my game and I see a big issue. It doesn't look like you're actually handling scene loads correctly. There's no code that I can find that tracks the actual progress of the scene loaded and then switching to the "Press Any Key to Continue" once the scene is fully loaded. It just seems to fill the progress bar by a random amount and then give the press any key text a second after that. But the scene, in my case, is over a minute from actually loading. I'm going to fix all this in my local version, but I think you should make this a part of a future update since it's behaving incorrectly.
     
  19. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    I also have an unrelated question about the Loading Menu as well. I've properly set up my scene names and they are in the build settings. The MainMenu scene plays its audio properly, and the Sandbox scene plays it's audio properly. However the LoadingScreen scene does not play any audio, goes silent. This is using the default EMM loading scene by the way. Any ideas why I can't get audio to start playing in the loading scene? Looking at the audio source playing the BG audio, it looks like it fades down to zero volume, but never fades back up for the loading scene.

     
  20. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    You can alternatively add an Audio source in the loading scene with your audio clip. ;)
    I have intentionally disabled the loading screen's audio coz it just manipulates audio clips of all the scenes. I will try looking at it and see if I can adjust it so that it can play one for loading screen as well! :)
     
  21. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    The scene is being loaded asynchronously and hence loads before even loading bar starts loading.
    Delays always occurr in Editor. Try building the scene and see if the delay persists.
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    Exactly. When you load asynchronously it's not a blocking call so returns immediately. You have no mechanism to determine the progress, which is done via aync.progress. And there is also an event which fires when the load is complete, which you are also not handling. Trust me, you're doing it wrong. I built for stand-alone on target platform and it isn't working. Take a look at this Q&A for details on how the async progress part should be done:

    https://answers.unity.com/questions/457594/how-to-make-a-progress-bar-for-loading-next-scene.html

    And then you need to use the SceneManager sceneLoaded delegate for when the scene actually finishes loading.
     
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    In your code you have the following:

    Code (CSharp):
    1. InvokeRepeating("fillLoadingBar", fillDelay, fillSpeed);
    Which simply calls the fillLoadingBar function every .5 seconds and within that function the following:

    Code (CSharp):
    1.  loadingBar.value += Random.Range(0,10);
    Increasing the progress by a random amount.

    Clearly it's all smoke and mirrors right now. I don't think you are intentionally being deceptive here, but you don't understand how this mechanism is supposed to work.
     
    JamesArndt likes this.
  24. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    I never really knew what the progress bar and loading scene were supposed to do...is this to show the player the delay in the level's async loading progress?
     
  25. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Ohhh, I just learned a new thing today lol. I am very sorry for this. I didn't thought that it will be having such kinda impact as I mostly tested it with the maze scene which is not too much heavy so I mever noticed this thing... I will definitely fix this. :)
    Thanks a lot for the feedback! This just improved the EMM a lot!
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    No problem. Glad I could help.
     
  27. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    Yes. The loading bar should represent the percentage of the level that has been loaded, which is reported via the async.progress value if implemented. So, once 100% is reached then pressing any key will instantly show the scene.
     
    transat, AndyNeoman and JamesArndt like this.
  28. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    So what's the easy fix to get the Loading Scene to work the way it should properly? Is this difficult to code up or no?
     
  29. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,684
    It's fairly easy if done from scratch, but integrating it with the existing code is a little tricky. I haven't made the fix myself yet, but the link I posted earlier should be good for guidance. The async scene loading needs to return an AsyncOperation object, which can then be used to get the progress on every frame Update. Then you need to add a handler to the sceneLoaded delegate to handle when the scene is fully loaded.
     
    JamesArndt likes this.
  30. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Hi @walledcityinfotech , I have just integrated the config button menu and it looks great apart from rebinding to controller does not seem to work. Have you tested working and is it just local to me?

    Test case. Set up button1 on menu, set it to joypad1, all works, got to reconfig screen and press to edit, you controller buttons are not working. It will accept keyboard replacements but not joypad.

    EDIT :- Also mouse buttons don't work.
     
    Last edited: Apr 2, 2018
  31. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,679
    I have found some behavior I cannot control at this point. When I pause in-game and the menu prefab pops up, I push the Main Menu button to return to the main menu scene. It's kicking me out to the load scene though. I looked for the method that controls this and it's the void goToMainMenu() method in UIController.cs. I only see a line in there that's a setting a string for the "sceneToLoad". I don't see anywhere that this method is being passed the actual scene name to load. This might some ignorance on my part.
     
  32. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    SceneToLoad is the string which contains the Scene Name to be loaded. So, Everytime you have to go to another scene, emm loads the Loading Scene and if you look at Loading screen script, there we are retrieving the scene which is to be loaded by this exact string.
    And there, after loading bar gets full, we load the scene. :)
    It's kinda complex way lol :p
     
  33. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Hi @walledcityinfotech , could you respond to my message above? If you could confirm that the reconfig screen doesn't work with joypad/and mouse at the moment and ETA on a fix as it is vital to PC/Steam release. I'm pretty new to releasing on Steam myself (only mobile dev previously) but config of buttons is important. Being able to choose mouse/joypad needs to be in there.

    Thanks,

    Andy
     
  34. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Oh sorry, I missed it somehow, the reconfig screen is something I have to redo from scratch. Will definitely try to do it in the next update! :)
     
    AndyNeoman likes this.
  35. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872

    Great, thanks.
     
  36. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Any news on the update @walledcityinfotech ?

    Is there a way to access the positve desciption for the easyinput utility?

    I want to display whatever the keyboard button is onscreen controls so it needs to change when a user has changed the button configuration.
     
    JamesArndt likes this.
  37. jrackley

    jrackley

    Joined:
    Jan 26, 2017
    Posts:
    55
    @walledcityinfotech are there ever any plans to fix the Invector integration at all, with the Inventory not saving across scenes? If not then you should probably pull that from the listing on the asset store as it does not work at all, not even in the demo.
    I know it is a lot of work to keep up on integrations so I am not complaining, but it has been months since you mentioned you would fix it.
     
  38. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Please accept my sincere apologies... The update is coming next week or at most next to next week. :)
    Invector has changed a lot of stuff... I mean A LOT!!!! I am diving into their inventory system and it is unnecessarily complex... I will be updating here the progress I will be making and thank you for your support and patience!

    Hi bro, I will post this as soon as I get back on my system or I will send it to you via PM! :)
     
    transat and AndyNeoman like this.
  39. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Brilliant thank you!
     
  40. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Hi @walledcityinfotech hope you are well and you have not had any issues with the update. How are we with accessing the positive key for the above problem for displaying controls onscreen?

    I'm also starting to look at a saving system is there anything in the update for the save system? I'm going to need to save player position, and some team AI, plus score features and number of AI in the team etc... If it is not on the horizon just let me know and I will begin coding myself. I pretty by cool little assets like this to speed up my dev-time but I don't expect them to do everything.
     
  41. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Hi bro, sorry for the late reply, you can access the positive keys from the easy input utility's class by checking in the List what are all the inputs being used and see what are there positive and negative values.

    Regarding saving, emm does save the player position, however if you want to save some other things as well, i recommend seeing the script of save game ui and see how I saved the player position. Also, everything is commented so you won't find any trouble in understanding anything. Still if you want to ask something, I am always here! :)
     
  42. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Thanks, is there some documentation on what classes to reference or scripts? Could you sample how to grab these values in the positive description as strings so they can be written to text components.
     
  43. A2GStudios

    A2GStudios

    Joined:
    Nov 21, 2016
    Posts:
    51
    I have been using EMM in another one of my projects and I love it, it's awesome. Now I am working on a new project using Opsive TPC, EBS, VS, Aquas, and Inventory Pro. I added EMM and everything seems to be working fine except I have 2 players spawn in on top of each other when I start a game. I can control both players, and it happens in the editor and the build. I noticed in the editor while playing that once the loading screen loads it creates a second player in the hierarchy. Do you have any thoughts on what I could be doing wrong? Thanks
     
  44. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Hi, thanks for nice words! :)
    EMM don't generate/instantiate the player. It just finds the 'Player' tagged object and move it's position and rotation to the save point (if any).

    I can suggest a quick fix that in any of your script in the start() method, just destroy one player at runtime.

    Destroy (Gameobject.FindObjectWithTag("Player"));

    Let me know if it didn't work out! :)
     
  45. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    262
    What’s the roadmap for future development and do you have an ETA ?

    Thx
     
  46. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Hi,
    I think you guys should tell me what is left to be added in the Easy Main Menu, I would love to add it! :)
     
  47. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872

    I thought there was an update due?

    Previous posts mentioned adding a menu in game for options/sounds etc... Also the save system was being changed.

    I understood the loading screen was being fixed so the update bar actually reflected the progress of load?

    I would also recommend making the asset more modular so things could be added or taken away without causing issues. The current save/load system doesn't really work for a production ready game but cannot be removed without causing errors.

    It's a good base and I don't want to come across negative because it speeds up production adding these assets but I'm surprised you are not updating as your posts have suggested for some time that big improvements are being made.
     
    f1chris likes this.
  48. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    262
    ..and a Rewired integration !!
     
  49. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    @f1chris oh bro, I wasn't doing any rewired integration as Mr @guavaman said so a few weeks ago. I hope you will be able to make it work together by using the Rewired Standalone Input module as suggested by the developer of Rewired in his post. :)
     
    guavaman likes this.
  50. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Hi bro, these are the improvements which are coming but I was asking about some features which were left to be added.
    Regarding save nd load, I am thinking like how should it be improved more coz currently it is saving player's pos and rot which is good enough as a start for yourself to begin with :)
    To make it more modular I was thinking about adding event systems so you can have your own custom scripts working fine without really getting into the Emm's scripts.
     
    wood333 and AndyNeoman like this.