SettingsPage

Blank page with only the essentials

Usage

Content manually added to a SettingsPage should be added through SettingsPage.InnerContent

// Creates a new page
var SettingsPage = new SettingsPage("My Settings Page", "Example Footer");

Structure

Inherits UnityEngine.UIElements.VisualElement

Fields

Field Name
Type
Description

InnerContent

VisualElement

Location where settings options are added.

Title

Label

Text at the top of the SettingsPage

Display Methods

Method Name
Type
Description

Show()

void

Adds the Settings Menu to the game UI.

Hide()

void

Removes the Settings Menu from the game UI.

HideNoAction()

void

Removes the Settings Menu without calling.

Content Methods

Adds a new divider & label to SettingsPage.InnerContent.

//example divider
SettingsPage.AddDivider("Text Goes Here");

Learn More

Overloads : BackAction

Changes the close button's behavior from the default to the passed action

// Creates a new page
var SettingsPage = new SettingsPage(
    "My Settings Page",
    "Example Footer",
    OpenPreviousPage
);

//elsewhere
public void OpenPreviousPage(){
    //navigation code
}

Last updated