Main Menu

Revision as of 18:09, 22 March 2026 by Zegs32 (talk | contribs) (Created page with "{{DISPLAYTITLE:Main Menu}} {{about|the title screen and front-end of ''PC Simulator''|the in-game pause overlay|Pause menu}} The '''main menu''' is the first interactive screen in ''PC Simulator'' after the '''Menu''' scene loads. It is driven by the {{mono|MainMenu}} behaviour, which initializes localization, restores certain settings, presents navigation via {{mono|MenuManager}}, and starts asynchronous scene loads with a dedicated '''Loading''' page....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:About

The main menu is the first interactive screen in PC Simulator after the Menu scene loads. It is driven by the Template:Mono behaviour, which initializes localization, restores certain settings, presents navigation via Template:Mono, and starts asynchronous scene loads with a dedicated Loading page.

Overview

The main menu acts as the hub for:

  • Starting or resuming a game from save files (Template:Mono) in the user save folder
  • Launching the Tutorial scene (and recording that the current tutorial version has been offered)
  • Loading example presets from StreamingAssets/Examples (e.g. named saves such as Template:Mono, versioned examples, or Template:Mono when triggered from in-game secrets)
  • Opening sub-pages for options, language, credits, file management, etc. (each implemented as a child page under Template:Mono)
  • Exiting the application on supported platforms

The on-screen title alternates between Template:Mono and Template:Mono with a blinking underscore, with Template:Mono highlighted in orange (Rich Text on Unity UI).

Localization

On Template:Mono, the menu:

  1. Calls Template:Mono
  2. Sets the active language from Template:Mono key Template:Mono, or falls back to a code derived from Template:Mono (e.g. Template:Mono, Template:Mono, Template:Mono, Template:Mono, and many others)
  3. Subscribes to Template:Mono to persist the chosen language back to Template:Mono

Settings restored at menu start

In Template:Mono, the menu restores:

Tutorial prompt

If Template:Mono is strictly less than a serialized Template:Mono on the menu component, the guide to tutorial object is shown; otherwise it is hidden. Entering the tutorial via Template:Mono sets Template:Mono to the current version and loads the Tutorial scene by name.

Navigation stack

The Template:Mono component maintains a stack of active menu Template:Mono pages:

  • Template:Mono finds a child menu whose name matches Template:Mono, hides the current top if different, and pushes the new page
  • Template:Mono pops the stack (if more than one entry) and reactivates the previous page
  • Template:Mono toggles visibility of the top page without changing the stack (used when gameplay hides UI)
  • Optional click sounds can play on navigation when enabled

Loading a scene always calls Template:Mono first so the player sees the loading overlay for the duration of the async operation.

Loading screen behaviour

Scene loads use Template:Mono with Template:Mono held at Template:Mono until progress reaches Template:Mono. The displayed percentage uses:

Mathf.Clamp01(operation.progress / 0.9f) * 100f

When progress is at least Template:Mono, the text shows 100%, waits 0.5 seconds, then allows activation. The label uses the localized string for Template:Mono plus a bracketed percentage on a new line.

Save files and examples

User saves

The File menu (Template:Mono) scans the save directory for files matching the save extension, sorts them by last write time (newest first), and instantiates a slot per valid file. Each slot shows the save’s Template:Mono and a Hardcore indicator when Template:Mono is true. Clicking the name button calls Template:Mono, which assigns Template:Mono and loads the scene index Template:Mono.

Example presets

Template:Mono reads Template:Mono. On Android and WebGL, the file is fetched with Template:Mono; on other platforms, Template:Mono is used. The string is passed through Template:Mono and then the same Template:Mono path as a user save.

Starting gameplay scenes

Exit

Template:Mono calls Template:Mono. On some platforms (e.g. editor or certain mobile builds), this may have no visible effect.

Implementation notes

Unity component Role
Template:Mono Singleton Template:Mono; localization; tutorial gating; scene and example loading; title blink coroutine (Template:Mono every 0.5 s)
Template:Mono Stack of menu pages; show/back/hide; optional UI click sound
Template:Mono Lists saves, import, file info sub-page

See also