How to use the menu system that is on the extras page

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Bond of Blood
Posts: 21
Joined: Wed Mar 22, 2023 7:59 pm

How to use the menu system that is on the extras page

Post by Bond of Blood »

I am putting in the dialogue, love and hate, and quest systems and I am using the menu system that is on the extras page but I am having trouble getting it set up because I am a very new programmer. The documentation page does not go in enough detail and I could not find a video. Could someone explain how to set up the scene changer, save system, how to make there only be certain sizes in resolution, how to add a master volume control ( there is only sfx and music), how to make the full screen work and how to add a button that will turn off certain photosensitive lights. I know I am asking a lot but I am willing to pay someone for the help I am really stuck.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use the menu system that is on the extras page

Post by Tony Li »

Hi,

The Menu Framework doesn't have some of those features (since it's really intended to just be a starting point), but we'll get through as many as we can. Let's take each one step by step, starting with the save system.

I recommend these steps:

1. Add an instance of the Menu System prefab to a new, empty scene. Then drag the Menu System from the Hierarchy view back into the Project view, in one of your own folders. Unity will ask if you want to "Create Prefab or Variant?" Click Create Prefab Variant. By creating a prefab variant, you can customize the appearance and settings of the variant without worrying about losing your customizations if you ever import an updated version of the Menu Framework package.

2. Then open your own main menu scene. Add your Menu System prefab variant. (Remove the previous Menu System GameObject if the scene has it, so that there's only one.)

3. Add Dialogue Manager, Quest Machine, and Love/Hate Faction Manager GameObjects to the scene. None of these GameObjects should have a Save System component.

4. Download the Save System Prefabs package (direct download) from the Extras page. Import the package. Then add the Save System prefab to the scene. This prefab is preconfigured with the save system components and scene transition manager.

5. Add your main menu scene and the LoadingScreen scene to Unity's build settings. Also add at least one gameplay scene. You can add more gameplay scenes later.

6. Inspect your Menu System prefab variant in the Project view, and locate the Save Helper component. Set the First Gameplay Scene field to the name of the first gameplay scene in build settings. If you've added a credits scene to the build settings (see the Example folder's Credits scene), locate the Title Menu component and set the Credits Scene Index to the build settings index of the credits scene.

Give that a try. Make sure you can start in the main menu scene, start a new game, do some stuff, and save the game. Then return to the main menu and make sure you can continue or load your saved game.

Once you know that works, you can add an instance of the Menu System prefab variant to your gameplay scene(s). Expand this Menu System in the Hierarchy view, and deactivate the TitleMenuPanel child GameObject. This will let you start play mode from the gameplay scene instead of the main menu scene if you want, for quicker playtesting.

Once you've confirmed that this all works, we can look at the other items.
User avatar
Bond of Blood
Posts: 21
Joined: Wed Mar 22, 2023 7:59 pm

Re: How to use the menu system that is on the extras page

Post by Bond of Blood »

Thank you very much I will do that stuff and hope I don't mess it up.
User avatar
Bond of Blood
Posts: 21
Joined: Wed Mar 22, 2023 7:59 pm

Re: How to use the menu system that is on the extras page

Post by Bond of Blood »

Ok I got most of that working I think but I have having a few problems. When I load into the first gameplay scene the mouse cursor is on screen the whole time when it should not be. And I can't seem to be able to quick save and I am still not sure how I bring up the save menu.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use the menu system that is on the extras page

Post by Tony Li »

Hi,

The mouse cursor may be under the control of some other asset or script. Are you using any character controller scripts or assets?

Press Escape to open the pause menu. Technically the "Cancel" input as defined in Edit > Project Settings > Input Manager > Axes > Cancel. This assumes you're using Unity's built-in input manager.

To use quick save and quick load define additional inputs (e.g., "QuickSave" and "QuickLoad") in the Axes list. Then specify those names in the Menu System's Save Helper component > Quick Save Button and Quick Load Button.
User avatar
Bond of Blood
Posts: 21
Joined: Wed Mar 22, 2023 7:59 pm

Re: How to use the menu system that is on the extras page

Post by Bond of Blood »

Yes I am using the starter asset character controller that unity comes with.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use the menu system that is on the extras page

Post by Tony Li »

Hi,

This might be helpful:

How To: Configure Starter Assets First/Third Person Controller

If that doesn't help, please let me know if you're using the first person controller, third person controller, or something else.
User avatar
Bond of Blood
Posts: 21
Joined: Wed Mar 22, 2023 7:59 pm

Re: How to use the menu system that is on the extras page

Post by Bond of Blood »

I did all that already. I am using the first person controller and when I load into the gameplay scene from the main menu the mouse curosor is always on the screen and I am able to click on stuff in the unity stuff outside the game window. It works fine if I open the game scene itself and not load in from the main menu. How do I fix this please.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use the menu system that is on the extras page

Post by Tony Li »

Hi,

Interesting. This is actually an issue with the FirstPersonController. I'll pass it along to Unity. It depends on an "OnApplicationFocus" method to hide the cursor. Here's how to get it working:

1. Import the HideCursor script included in this package:

DS_StarterFPC_MenuFramework_2023-03-27.unitypackage

2. Add the HideCursor script to your player GameObject.

3. On your Dialogue Manager GameObject(s), UNtick the Input Device Manager component's Control Cursor State checkbox.

The package above also includes an example start scene preconfigured for the Menu Framework and an example gameplay scene. You can add both scenes to build settings, play the start scene, and select Start (or Restart) to test it out.
User avatar
Bond of Blood
Posts: 21
Joined: Wed Mar 22, 2023 7:59 pm

Re: How to use the menu system that is on the extras page

Post by Bond of Blood »

Thank you that seemed to work. Now say I want a dialogue option to lead to a new scene if the character has a certain item how would I do that. And would I use something from the dialogue system to say open a door to a new scene.
Post Reply