How to add additional custom panels to in-game menu?

I've hidden "Save/Load" as I don't need it in my case. I would like to add several other tabs, such as "Key Bindings," "Quality Settings," etc. What's the proper way to do this?

Thank you
 
Another user asked a similar question and I realized there wasn't an easy way to add your custom Main Menu sub panels.
On Monday I added some option in UI Designer that makes it super easy to add and remove sub panels... Unfortunately this update won't come out for some time because there are other things I need to fix.

Here I'm sending you the new MainMenuDesigner script. Replace the old script with this one. (If it doesn't work let me know).

You should get something like this:
1608106955979.png
As you can see there's a "+/-" to add and remove sub panels.

Then you just need to rename the panel and button text. You can find the panel content and start adding to it.
If your custom scripts need to know when the panel was opened/close you can do so in many ways.

1) OnEnable/OnDisable (most probably the easiest one and you should be familiar with this)
2) Inherit DisplayPanelBinding class and override OnOpen, OnClose
3) listen to the C# event on the DisplayPanel
4) Listen to the Event Handler event EventNames.c_GameObject_OnPanelOpenClose_PanelEventData

I hope this helps,
Also if you have any suggestions to improve the new Main Menu Designer let us know
 

Attachments

  • MainMenuDesigner.cs
    8.7 KB · Views: 2
Sorry I forgot about that small change.

Add this function to the ActionButton class

Code:
/// <summary>
/// Get the name of the button.
/// </summary>
public virtual string GetButtonName()
{
    return m_Text.text;
}

If there are other compilation errors let me know, I'll send you the fix.
I'm afraid I cannot give you the full project update yet because I'm working on a few big refactors
 
Top