Manages the main menu and settings UI, including scene transitions, graphics and audio settings, and PlayerPrefs persistence.
More...
|
void | StartGame () |
| Starts the game by loading the loading screen or game scene.
|
|
void | QuitGame () |
| Quits the application or stops play mode if in the Unity Editor.
|
|
void | LoadSettingsScene () |
| Loads the settings scene from the main menu.
|
|
void | BackToMenu () |
| Returns to the main menu scene.
|
|
void | SetGraphicsQuality (int index) |
| Sets the graphics quality based on dropdown index and saves it to PlayerPrefs.
|
|
void | SetFullscreen (int dropdownIndex) |
| Sets fullscreen or windowed mode based on dropdown index and saves it.
|
|
void | SetMasterVolume (float volume) |
| Sets the master audio volume and saves it.
|
|
void | SetMusicVolume (float volume) |
| Sets the music volume and saves it.
|
|
void | LoadSettings () |
| Loads settings from PlayerPrefs and applies them to the UI and game.
|
|
void | ResetToDefaults () |
| Resets all settings to default values and saves them.
|
|
Manages the main menu and settings UI, including scene transitions, graphics and audio settings, and PlayerPrefs persistence.
◆ BackToMenu()
void MainMenuManager.BackToMenu |
( |
| ) |
|
Returns to the main menu scene.
◆ LoadSettings()
void MainMenuManager.LoadSettings |
( |
| ) |
|
Loads settings from PlayerPrefs and applies them to the UI and game.
◆ LoadSettingsScene()
void MainMenuManager.LoadSettingsScene |
( |
| ) |
|
Loads the settings scene from the main menu.
◆ QuitGame()
void MainMenuManager.QuitGame |
( |
| ) |
|
Quits the application or stops play mode if in the Unity Editor.
◆ ResetToDefaults()
void MainMenuManager.ResetToDefaults |
( |
| ) |
|
Resets all settings to default values and saves them.
◆ SetFullscreen()
void MainMenuManager.SetFullscreen |
( |
int |
dropdownIndex | ) |
|
Sets fullscreen or windowed mode based on dropdown index and saves it.
- Parameters
-
dropdownIndex | 0 for fullscreen, 1 for windowed. |
◆ SetGraphicsQuality()
void MainMenuManager.SetGraphicsQuality |
( |
int |
index | ) |
|
Sets the graphics quality based on dropdown index and saves it to PlayerPrefs.
- Parameters
-
index | Index of the graphics quality level. |
◆ SetMasterVolume()
void MainMenuManager.SetMasterVolume |
( |
float |
volume | ) |
|
Sets the master audio volume and saves it.
- Parameters
-
volume | Volume level between 0.0 and 1.0. |
◆ SetMusicVolume()
void MainMenuManager.SetMusicVolume |
( |
float |
volume | ) |
|
Sets the music volume and saves it.
- Parameters
-
volume | Music volume level between 0.0 and 1.0. |
◆ StartGame()
void MainMenuManager.StartGame |
( |
| ) |
|
Starts the game by loading the loading screen or game scene.
◆ fullscreenDropdown
TMP_Dropdown MainMenuManager.fullscreenDropdown |
Dropdown for selecting fullscreen mode (0 = fullscreen, 1 = windowed).
◆ graphicsDropdown
TMP_Dropdown MainMenuManager.graphicsDropdown |
Dropdown for selecting graphics quality level.
◆ LoadingscreenSceneName
string MainMenuManager.LoadingscreenSceneName = "LoadingScene" |
Name of the scene that serves as a loading screen or transition to gameplay.
◆ mainMenuSceneName
string MainMenuManager.mainMenuSceneName = "MainMenu" |
Name of the main menu scene.
◆ masterVolumeSlider
Slider MainMenuManager.masterVolumeSlider |
Slider for controlling the master audio volume.
◆ musicVolumeSlider
Slider MainMenuManager.musicVolumeSlider |
Slider for controlling the music volume.
◆ settingsSceneName
string MainMenuManager.settingsSceneName = "Settings" |
Name of the settings menu scene.
The documentation for this class was generated from the following file: