Main Menu: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
= Main menu = | |||
{| style="float:right; width: | When you start '''PC Simulator''', the first place you land is the '''main menu'''. This is where you choose what to do next—open a [[Save]], try the [[Tutorial]] (if the game nudges you), change options, or quit back to your desktop. | ||
|+ style="background:#eaecf0; border:1px solid # | |||
The menu is part of the '''Menu''' scene in the game build. For how saves are stored and edited outside the game, see [[Save]] and [[Save Editor]]; for oddities and easter eggs that sometimes touch the menu flow, see [[Secrets]] and [[Achievements:The Hidden Room]]. | |||
{| style="float:right; width:280px; margin:0 0 1em 1em; border-collapse:collapse; border:1px solid #c8ccd1; background:#f8f9fa; font-size:92%;" | |||
|+ style="background:#eaecf0; border:1px solid #c8ccd1; padding:6px; font-weight:bold;" | At a glance | |||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | '''Feels like''' | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | A hub: pick a save, learn the ropes, or adjust the game before you play | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | '''Saves''' | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | Your <code>.pc</code> files — see [[Save]] | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | '''Money vs crypto''' | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | In-game cash and [[Bitcoin]] (mining apps tie into [[EZ Mining]]) | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | '''Small touch''' | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:6px;" | The title blinks, a bit like a cursor | ||
|} | |} | ||
<div style="clear:both;"></div> | |||
= | |||
== | == What you can do here == | ||
* | * '''Load a game''' — Your saves show up as a list (newest usually first). Hardcore runs may show a little marker so you don’t mix them up with normal runs. | ||
* | * '''Tutorial''' — If you haven’t seen the latest tutorial revision, the game may suggest it. Accepting marks that version as “seen” so it won’t keep asking every launch. | ||
* | * '''Settings''' — Things like language, resolution, and frame rate options get applied early so the menu already matches how you like to play. | ||
* | * '''Volume''' — Master volume from your last session is restored before you hear much audio. | ||
* '''Import a save''' — You can pull in a <code>.pc</code> file from somewhere else (handy if you’re [[Modding]] or sharing with friends). Bad or incompatible files show a clear error instead of silently breaking. | |||
* '''Quit''' — Closes the game on builds that support it (in the editor it often does nothing visible). | |||
== | == How starting a game works (simple) == | ||
# You pick a save row (or the game loads a preset / example file). | |||
# The game stores “use this file” for the next scene. | |||
# You’re sent to the '''room''' that save belongs to—not every save uses the same room layout. | |||
Some [[Secrets]] or special triggers load an example file (for instance content tied to [[Achievements:The Hidden Room]]). Under the hood that’s the same pipeline as opening a normal [[Save]], just reading from a different folder. | |||
== In-depth == | |||
This section is for readers who want '''exact behaviour''' and '''script names'''. It matches the decompiled / project logic; if you’re digging through assets, see [[Decompile]] and [[Modding]]. | |||
=== Scripts and roles === | |||
{| style="border-collapse:collapse; width:100%; border:1px solid #c8ccd1;" | |||
{| style="border-collapse:collapse; width:100%; border:1px solid # | |||
|- style="background:#eaecf0;" | |- style="background:#eaecf0;" | ||
! style="border:1px solid # | ! style="border:1px solid #c8ccd1; padding:8px; text-align:left; width:22%;" | Script | ||
! style="border:1px solid # | ! style="border:1px solid #c8ccd1; padding:8px; text-align:left;" | Role | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | <code>MainMenu</code> | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | Singleton (<code>MainMenu.Instance</code>). Initializes [[Localization]] (below), restores FPS/resolution, handles tutorial version gating, blinks the title, loads scenes and example files, calls <code>Application.Quit</code>. | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | <code>MenuManager</code> | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | Stack of active menu <code>GameObject</code> pages. <code>ShowMenu(string)</code> finds a child whose '''hierarchy name''' matches the string (e.g. <code>Loading</code>). <code>Back</code> pops one level. <code>HideMenu</code> toggles the top without popping. Optional click sounds. | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | <code>FileMenu</code> | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | Scans the save directory for <code>.pc</code> files, sorts by last write time, builds UI rows, supports rename/metadata via <code>FileInformation</code>, delete, and import through a native file picker. | ||
|} | |} | ||
== | === Localization === | ||
On <code>Awake</code>, <code>MainMenu</code> calls <code>Localization.CreateContent()</code>, sets language from <code>PlayerPrefs "Language"</code> or maps <code>Application.systemLanguage</code> to a short code, and subscribes to language changes to persist the choice. See also the standalone page [[Localization]] for strings and language list detail if you document it there. | |||
=== Tutorial gating === | |||
<code>PlayerPrefs.GetInt("TutorialVersion", -1)</code> is compared to an editor field <code>tutorialVersion</code>. If the stored value is lower, <code>guideToTutorial</code> is shown. <code>Tutorial()</code> writes the current version and loads the <code>"Tutorial"</code> scene by name. | |||
=== Loading screen === | |||
Any menu-driven scene load shows the <code>Loading</code> page first, then runs an async load coroutine: progress is mapped from Unity’s <code>0…0.9</code> range to a 0–100% display; at <code>0.9</code> it shows 100%, waits 0.5s, then allows scene activation. See [[Loading screen]] for a dedicated write-up if you split it out. | |||
=== | === Save load path === | ||
<code>LoadFile(DataLoader loader)</code> assigns <code>SaveManager.Loader = loader</code> and loads build index <code>startRoomSceneIndex + GameData.room</code>. The base index is set in the inspector so save data only needs a small room id. Full format notes belong on [[Save]]. | |||
=== | === Example / preset loads === | ||
<code>LoadExample(string name)</code> reads <code>StreamingAssets/Examples/{name}.pc</code>. On Android/WebGL it uses <code>UnityWebRequest</code>; elsewhere <code>File.ReadAllText</code>. Parsed with <code>DataLoader.LoadFromString</code>, then the same <code>LoadFile</code> as user saves. Document bundled filenames on [[StreamingAssets]] if you list them. | |||
=== | === File import (<code>FileMenu.Import</code>) === | ||
Native picker filtered to <code>.pc</code>, read permission check, <code>DataLoader.LoadFromPath()</code> validation (failure message mentions compatibility with version 1.7.0+), then <code>File.Copy</code> into the save folder via <code>SaveUtility.GetNewPath</code>, destroy old rows, rescan folder. | |||
=== | === Related systems === | ||
* '''In-game pause''' uses the same hide/show idea for UI; short page: [[Pause menu]]. | |||
* '''Gallery''' for menu screenshots: [[Gallery]]. | |||
* '''Credits / people''': [[Cheng Yi-Ming]], [[Yiming Connect]], [[VerdiX]] (link where your wiki places engine or services context). | |||
* '''Wiki conduct''': [[PC Simulator Unofficial Wiki:Rules]]. | |||
=== Data flow | === Data flow (quick reference) === | ||
{| style="border-collapse:collapse; width:100%; border:1px solid # | {| style="border-collapse:collapse; width:100%; border:1px solid #c8ccd1;" | ||
|- style="background:#eaecf0;" | |- style="background:#eaecf0;" | ||
! style="border:1px solid # | ! style="border:1px solid #c8ccd1; padding:8px; text-align:left; width:28%;" | Trigger | ||
! style="border:1px solid # | ! style="border:1px solid #c8ccd1; padding:8px; text-align:left;" | What runs | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Click save name | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | <code>MainMenu.LoadFile</code> → <code>SaveManager.Loader</code> → async <code>startRoomSceneIndex + room</code> | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Example / secret preset | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | <code>LoadExample</code> from streaming path → <code>LoadFile</code> (same as save) | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Any menu scene transition | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | <code>ShowMenu("Loading")</code> then async coroutine | ||
|- | |- | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Start tutorial | ||
| style="border:1px solid # | | style="border:1px solid #c8ccd1; padding:8px;" | Update <code>TutorialVersion</code> → <code>LoadScene("Tutorial")</code> | ||
|} | |} | ||
== See also == | == See also == | ||
* | * [[PC Simulator]] — the game this menu belongs to | ||
* | * [[Save]] · [[Save Editor]] — files and external editing | ||
* | * [[Secrets]] · [[Achievements:The Hidden Room]] — hidden flows that load special saves | ||
* [[Bitcoin]] · [[EZ Mining]] — economy hooks players meet after leaving the menu | |||
* [[Modding]] · [[Decompile]] — digging into <code>MainMenu</code> / <code>MenuManager</code> / <code>FileMenu</code> | |||
* [[Main Page]] — wiki home | |||
'''Pages to add (red links on purpose):''' [[Tutorial]] · [[Localization]] · [[Loading screen]] · [[StreamingAssets]] · [[Pause menu]] | |||
Revision as of 18:17, 22 March 2026
When you start PC Simulator, the first place you land is the main menu. This is where you choose what to do next—open a Save, try the Tutorial (if the game nudges you), change options, or quit back to your desktop.
The menu is part of the Menu scene in the game build. For how saves are stored and edited outside the game, see Save and Save Editor; for oddities and easter eggs that sometimes touch the menu flow, see Secrets and Achievements:The Hidden Room.
| Feels like | A hub: pick a save, learn the ropes, or adjust the game before you play |
| Saves | Your .pc files — see Save
|
| Money vs crypto | In-game cash and Bitcoin (mining apps tie into EZ Mining) |
| Small touch | The title blinks, a bit like a cursor |
What you can do here
- Load a game — Your saves show up as a list (newest usually first). Hardcore runs may show a little marker so you don’t mix them up with normal runs.
- Tutorial — If you haven’t seen the latest tutorial revision, the game may suggest it. Accepting marks that version as “seen” so it won’t keep asking every launch.
- Settings — Things like language, resolution, and frame rate options get applied early so the menu already matches how you like to play.
- Volume — Master volume from your last session is restored before you hear much audio.
- Import a save — You can pull in a
.pcfile from somewhere else (handy if you’re Modding or sharing with friends). Bad or incompatible files show a clear error instead of silently breaking. - Quit — Closes the game on builds that support it (in the editor it often does nothing visible).
How starting a game works (simple)
- You pick a save row (or the game loads a preset / example file).
- The game stores “use this file” for the next scene.
- You’re sent to the room that save belongs to—not every save uses the same room layout.
Some Secrets or special triggers load an example file (for instance content tied to Achievements:The Hidden Room). Under the hood that’s the same pipeline as opening a normal Save, just reading from a different folder.
In-depth
This section is for readers who want exact behaviour and script names. It matches the decompiled / project logic; if you’re digging through assets, see Decompile and Modding.
Scripts and roles
| Script | Role |
|---|---|
MainMenu
|
Singleton (MainMenu.Instance). Initializes Localization (below), restores FPS/resolution, handles tutorial version gating, blinks the title, loads scenes and example files, calls Application.Quit.
|
MenuManager
|
Stack of active menu GameObject pages. ShowMenu(string) finds a child whose hierarchy name matches the string (e.g. Loading). Back pops one level. HideMenu toggles the top without popping. Optional click sounds.
|
FileMenu
|
Scans the save directory for .pc files, sorts by last write time, builds UI rows, supports rename/metadata via FileInformation, delete, and import through a native file picker.
|
Localization
On Awake, MainMenu calls Localization.CreateContent(), sets language from PlayerPrefs "Language" or maps Application.systemLanguage to a short code, and subscribes to language changes to persist the choice. See also the standalone page Localization for strings and language list detail if you document it there.
Tutorial gating
PlayerPrefs.GetInt("TutorialVersion", -1) is compared to an editor field tutorialVersion. If the stored value is lower, guideToTutorial is shown. Tutorial() writes the current version and loads the "Tutorial" scene by name.
Loading screen
Any menu-driven scene load shows the Loading page first, then runs an async load coroutine: progress is mapped from Unity’s 0…0.9 range to a 0–100% display; at 0.9 it shows 100%, waits 0.5s, then allows scene activation. See Loading screen for a dedicated write-up if you split it out.
Save load path
LoadFile(DataLoader loader) assigns SaveManager.Loader = loader and loads build index startRoomSceneIndex + GameData.room. The base index is set in the inspector so save data only needs a small room id. Full format notes belong on Save.
Example / preset loads
LoadExample(string name) reads StreamingAssets/Examples/{name}.pc. On Android/WebGL it uses UnityWebRequest; elsewhere File.ReadAllText. Parsed with DataLoader.LoadFromString, then the same LoadFile as user saves. Document bundled filenames on StreamingAssets if you list them.
File import (FileMenu.Import)
Native picker filtered to .pc, read permission check, DataLoader.LoadFromPath() validation (failure message mentions compatibility with version 1.7.0+), then File.Copy into the save folder via SaveUtility.GetNewPath, destroy old rows, rescan folder.
Related systems
- In-game pause uses the same hide/show idea for UI; short page: Pause menu.
- Gallery for menu screenshots: Gallery.
- Credits / people: Cheng Yi-Ming, Yiming Connect, VerdiX (link where your wiki places engine or services context).
- Wiki conduct: PC Simulator Unofficial Wiki:Rules.
Data flow (quick reference)
| Trigger | What runs |
|---|---|
| Click save name | MainMenu.LoadFile → SaveManager.Loader → async startRoomSceneIndex + room
|
| Example / secret preset | LoadExample from streaming path → LoadFile (same as save)
|
| Any menu scene transition | ShowMenu("Loading") then async coroutine
|
| Start tutorial | Update TutorialVersion → LoadScene("Tutorial")
|
See also
- PC Simulator — the game this menu belongs to
- Save · Save Editor — files and external editing
- Secrets · Achievements:The Hidden Room — hidden flows that load special saves
- Bitcoin · EZ Mining — economy hooks players meet after leaving the menu
- Modding · Decompile — digging into
MainMenu/MenuManager/FileMenu - Main Page — wiki home
Pages to add (red links on purpose): Tutorial · Localization · Loading screen · StreamingAssets · Pause menu