Customizing the Save System Test Menu

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
AlexNerd
Posts: 39
Joined: Sat Jun 29, 2019 11:46 am

Customizing the Save System Test Menu

Post by AlexNerd »

Hello! I'm using the Save System Test Menu in my game and so far it's working really well. There's just one problem: when the instructions show up for how to open the menu, the text is tiny. I want to make sure players see the instructions before they disappear, but I can't find how to adjust the text size. If anyone could give me pointers on this, that would be great!
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Customizing the Save System Test Menu

Post by Tony Li »

That menu script is very rudimentary. But if it meets your needs, might as well keep using it. (There's also a more extensive Menu Framework package on the Dialogue System Extras page.)

If you want to customize SaveSystemTestMenu.cs, try this:

Near the top of the script, add this line:

Code: Select all

    public class SaveSystemTestMenu : MonoBehaviour
    {
        public GUISkin guiSkin; //<-- ADD THIS.
In the OnGUI() method (around line 85), add this line:

Code: Select all

        void OnGUI()
        {
            GUI.skin = guiSkin; //<-- ADD THIS.
Then create a GUI Skin asset in your project, and assign it to the script's Gui Skin field.

If you play your scene, the menu will look the same as before.

Inspect the GUI Skin asset and change the size of Label > Font Size. You can also change its color, font, etc.

You can do the same for the Button section. This will change the appearance of the menu buttons. If you use a larger font, you may need to edit SaveSystemTestMenu and change this line to a higher number:

Code: Select all

const int ButtonHeight = 30;

The Dialogue System's DemoMenu script works similarly. It already has a Gui Skin field that you can assign a GUI Skin asset to, so you don't need to make any code modifications.
AlexNerd
Posts: 39
Joined: Sat Jun 29, 2019 11:46 am

Re: Customizing the Save System Test Menu

Post by AlexNerd »

Thank you so much! It looks much better now.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Customizing the Save System Test Menu

Post by Tony Li »

Glad to help! I added those changes to the script for the next update of the Dialogue System, too.
Post Reply