Use options to allow the player to change settings of your game.
Option Categories #
The option categories are used to define the game settings/options and display them in options menus. They are set up in UI > Option Categories.
A category defines the options that are available in it, e.g. bundling volume options in an Audio category or graphics options in a Graphics category.
Additionally, changes to the options can either directly change the current value or only be used after accepting them.
Saving Options #
The current values of the options can either be saved with a save game or in a separate options data file. The file is saved whenever accepting the changes (or closing the options menu). Each category defines if it’s saved in the save game or options data file.
The options data file is loaded when first starting the game, as well as when starting a new game or loading a save game. This guarantees that variable-based options are kept as they where saved. Options saved in save games are only loaded when loading a save game.
Save all options you want to keep globally (i.e. independent of save games) in the options data file.
General Settings #
The general settings handle the options data file location, input rebinding settings and the default options menu.
Options Data File #
Defines where the options data file is stored and offers the same locations as save game files.
E.g. store the file in the Persistent Data Path or PlayerPrefs.
Input Rebinding #
Options allow the player to rebind input keys to other input sources.
See below for more details.
Default Options Menu #
Defines the default options menu, which can be replaced with custom setups wherever used.
See below for more details.
Option Types #
Categories can add various options to them. Options are displayed by UI boxes using inputs, e.g. buttons, sliders, dropdowns or text inputs.
You can add custom option types by extending from the BaseOptionType class, the BaseValueOptionType<T> class, the GenericDropdownOptionType<T> class (dropdowns) or the GenericToggleOptionType<T> class (toggle between 2 values).
The following option types are available to add to your option categories.
Volume Options #
- Global Volume
An int/float value input to change the global volume. - Music Volume
An int/float value input to change the music volume, either the master volume for all channels or for a defined music channel. - Sound Volume
An int/float value input to change the sound volume, either the master volume for all channels or for a defined sound channel. - Mute Global Volume
A toggle input to mute the global volume. - Mute Music Volume
A toggle input to mute the music volume, either the master volume for all channels or for a defined music channel. - Mute Sound Volume
A toggle input to mute the sound volume, either the master volume for all channels or for a defined sound channel.
Graphics #
- Anti Aliasing (Dropdown)
Changes the anti aliasing value based on a dropdown selection.
AA usually uses a value of 0, 2, 4 or 8. - Full Screen Mode (Dropdown)
Changes the application’s full screen mode based on a dropdown selection.
You can add different modes to the dropdown, defaults to exclusive fullscreen and full screen window. - Full Screen Mode (Toggle)
Changes the application’s full screen mode between two modes based on a toggle.
Defaults to exclusive fullscreen and full screen window. - Quality Level (Dropdown)
Changes the graphics quality level based on a dropdown selection.
The available quality levels are based on your game’s Unity setup. - Refresh Rate (Dropdown)
Changes the application’s refresh rate based on a dropdown selection.
The available frequencies are determined by Screen.resolutions (see Unity documentation for details). - Screen Resolution (Dropdown)
Changes the application’s screen resolution based on a dropdown selection.
The available resolutions are determined by Screen.resolutions (see Unity documentation for details). - Shadow Quality (Dropdown)
Changes the shadow quality based on a dropdown selection.
You can add different types to the dropdown, defaults to adding all available shadow qualities. - Shadow Quality (Toggle)
Changes the shadow quality between two values based on a toggle.
Defaults to All and Disable. - Shadow Resolution (Dropdown)
Changes the shadow resolution based on a dropdown selection.
You can add different types to the dropdown, defaults to adding all available shadow resolutions.
Buttons #
- Accept
Accept the changes that where made to options.
Closing the options menu after accepting is optional. - Cancel
Resets the changes that where made to options.
Only resets changes that where not yet accepted.
Closing the options menu after resetting is optional. - Input Rebind
Starts rebinding of a defined input key. - Reset Input Bindings
Resets all input bindings to default (i.e. setup in the editor). - Options Menu
Opens another options menu.
Closing the current options menu is optional. The called options menu returns to the current options menu on closing. - Schematic Button
Starts a schematic.
Variables #
- Bool Variable
A toggle input to change a global bool variable. - Float Variable
A float value input to change a global float variable. - Int Variable
An int value input to change a global int variable. - Int Variable (Dropdown)
Changes a global int variable based on a dropdown selection.
A dropdown shows a list of options, the selected option’s index will be used. - String Variable
A text input to change a global int variable.
Other Settings #
- Random Battle Chance
An int/float value input to change the chance for random battles (using the Random Battle Area component).
Used as percent of the chance defined in random battle areas (plus bonuses). - Remember Selections
A toggle input to enable or disable remembering selections in battle menus, menu screens and combatant selections.
Only used if they individually enable remembering selections. - Save Confirmation
A toggle input to enable/disable showing the save question dialogue to confirm saving.
Only used if using the save question dialogue is enabled. - Text Speed
An int value input to change the speed of text typing in UI boxes.
Input Rebinding #
Input rebinding allows the player to change the input source for an input key. Rebinding is based on the input ID currently used for the options menu – i.e. also depending on where it was called from. E.g. for local multiplayer, each player can define their own controls via menu screens.
You can define what happens when rebinding an already used input, e.g. keeping both inputs, swapping the inputs or setting the other input to none.
Rebinding can only use input sources that are added to the settings here.
Cancel Key #
Optionally define an input key used to cancel input rebinding.
Please note that the cancel key’s input source can’t be used for rebinding. E.g. when bound to Escape, the escape key can’t be used to bind any other input to it.
Bind Audio #
Optionally play an audio clip when binding an input key to a new input source.
Rebind Info Dialogue #
Optionally show a rebind info dialogue while rebinding an input.
The dialogue can show content information about the input key as well as the current bound input source (e.g. key code).
Input Search #
Rebinding will search the defined input sources that are added here. Inputs are found on pressing down an input (e.g. key or mouse down).
Key Code #
Searches all Key Codes available in Unity for inputs. Key codes include keyboard keys, joypad buttons (but no sticks) and mouse clicks.
You can optionally add key codes that will be excluded.
Unity Input Manager #
Searches defined inputs from the Unity input manager, e..g used for joypad sticks or the mouse wheel.
You need to add and define the names of the inputs manually.
Mouse #
Searches mouse button inputs exclusively.
You can define if left, middle and right mouse button are used.
Touch #
Searches touch inputs.
You can define the maximum finger coung that can be used (e.g. 3 fingers).
Options Menus #
Categories and their options can be displayed in options menus in the start menu, menu screens and using a Call Options Menu node in schematics. Menu screens can display options menus either as a menu part or directly via a Button List menu calling an options menu.
Additionally, options menus can also open custom options menus as sub-menus.
Options menu setup is pretty simple, since it only displays the options you already defined in the categories.
Available Option Categories #
Define the categories that should be displayed in the options menu.
You can either use all categories or only defined categories. In case you want to use separate options menus for certain parts of your game settings, or call some settings as a sub-menu, you need to define the categories manually.
Category Box Settings #
Defines how the categories are displayed. This is similar to menu screens displaying types (e.g. item types in Inventory menu parts).
You can either show the categories in a separate UI box, as tabs of the options list box or hide the categories, only switching between them using input keys (or for single-category setups).
Option List Box Settings #
Define the UI box used to display the options of the current category (and the category tabs when displaying them as tabs).
Additionally, you can define an input key to reset the currently selected option, i.e. reset a single option.
Description Box #
Optionally show a description box for the currently selected category or option.
When using in menu screens as a menu part, the options menu will also use Description menu parts of the menu screen.