Menu framework
Menu framework
Hello
Simple question.
Where is the pause menu related to the menu framework? How do I call it.
Simple question.
Where is the pause menu related to the menu framework? How do I call it.
Re: Menu framework
Hi,
In desktop/console games, you would normally press the input defined in the Menu System's Pause component. By default, it's set to "Cancel", which is usually mapped to the Escape key.
However, in mobile games you can't normally press keyboard keys or joystick buttons. Instead, do this:
1. Save a prefab variant of your Menu System. Add a UI button to it. Let's call it "PauseMenuButton". Configure the UI button's OnClick() to call PausePanel.Open.
2. Configure the TitleMenuPanel's OnOpen() event to deactivate PauseMenuButton. Configure its OnClose() event to activate PauseMenuButton.
3. Configure the PauseMenu's OnOpen() event to deactivate PauseMenuButton. Configure its OnClose() event to activate PauseMenuButton.
In desktop/console games, you would normally press the input defined in the Menu System's Pause component. By default, it's set to "Cancel", which is usually mapped to the Escape key.
However, in mobile games you can't normally press keyboard keys or joystick buttons. Instead, do this:
1. Save a prefab variant of your Menu System. Add a UI button to it. Let's call it "PauseMenuButton". Configure the UI button's OnClick() to call PausePanel.Open.
2. Configure the TitleMenuPanel's OnOpen() event to deactivate PauseMenuButton. Configure its OnClose() event to activate PauseMenuButton.
3. Configure the PauseMenu's OnOpen() event to deactivate PauseMenuButton. Configure its OnClose() event to activate PauseMenuButton.
Re: Menu framework
Ok Tony
I followed the steps.
In title menu it works, but when i clik start and go to level1, i dont have the pausebutton UI?
Do i add the Menu prefab variant to the scene? I tried added it but then the menubuttons are visible ?
I followed the steps.
In title menu it works, but when i clik start and go to level1, i dont have the pausebutton UI?
Do i add the Menu prefab variant to the scene? I tried added it but then the menubuttons are visible ?
Re: Menu framework
Your Menu System prefab variant should be in the MainMenu scene. In this instance, set the PauseMenuButton inactive.
You can also put an instance in your gameplay scene if you want. If you put it in your gameplay scene, set the instance's TitleMenu inactive and PauseMenuButton active.
Make sure PauseMenuButton is inside the Menu System prefab variant's hierarchy.
You can also put an instance in your gameplay scene if you want. If you put it in your gameplay scene, set the instance's TitleMenu inactive and PauseMenuButton active.
Make sure PauseMenuButton is inside the Menu System prefab variant's hierarchy.
Re: Menu framework
Hi Tony
This is what my prefab variant looks like.
It is indeed in the main scene.
I dont understand what you mean with " In this instance, set the PauseMenuButton inactive" Are you saying that on the PauseMenuButton it self I should change the pausepanel Onclik to Deactivate?
EDIT:
2 issues when i drag a menu variant to the gameplay.
1:
Even if deactivate all gameobjects except the pausemenu button, when pressing start, the main menu START button is still visible
2:
It seems like i am fighting over canvas sorting? Either i can click on the UI buttton, but then i dont have mobile UI controls or the other way around??
This is what my prefab variant looks like.
It is indeed in the main scene.
I dont understand what you mean with " In this instance, set the PauseMenuButton inactive" Are you saying that on the PauseMenuButton it self I should change the pausepanel Onclik to Deactivate?
EDIT:
2 issues when i drag a menu variant to the gameplay.
1:
Even if deactivate all gameobjects except the pausemenu button, when pressing start, the main menu START button is still visible
2:
It seems like i am fighting over canvas sorting? Either i can click on the UI buttton, but then i dont have mobile UI controls or the other way around??
Re: Menu framework
Do not make the PauseMenuButton a child of TitleMenu. Make it a direct child of the Menu System.
Re: Menu framework
Thanks.
I did that.
And now it works when I launch game from main menu
Thanks Tony.
Now its only from level1 if i play i am not sure how to put it correctly
I did that.
And now it works when I launch game from main menu
Thanks Tony.
Now its only from level1 if i play i am not sure how to put it correctly
Re: Menu framework
Fixed it...
You are the KING!!!!
Thank you
EDIT:
Do you have a tutorial on how to setup the whole save / load system with invector..
You are the KING!!!!
Thank you
EDIT:
Do you have a tutorial on how to setup the whole save / load system with invector..
Re: Menu framework
Ok i set it up.
In gameplay I made two saves and they show up in the panel, but when i press on any of them, the scenes reload back to initial start NOT the saved game.
Yes i also did add the ReloadWhenDead script..
In gameplay I made two saves and they show up in the panel, but when i press on any of them, the scenes reload back to initial start NOT the saved game.
Yes i also did add the ReloadWhenDead script..